Coder Social home page Coder Social logo

Comments (11)

fostermh avatar fostermh commented on July 18, 2024 1

sorry just seeing your posts now. history is already purged. Please remove your local repos and re-clone. thanks.

from hakai-api-client-matlab.

tayden avatar tayden commented on July 18, 2024

I've got no issue with this. The Python and R versions of the API client are already public.

However, it seems like https://github.com/HakaiInstitute/hakai-api-client-matlab/blob/master/%2BHakai/%40Client/Client.m#L89 maybe hardcodes some info we don't want public. So that would have to be removed and then purged from the Git history before making it public.

Edit: I actually don't see this used anywhere in the rest of the code, and it's just a private property, not secret information. Even if you go to that URL, it just throws an error.

from hakai-api-client-matlab.

JessyBarrette avatar JessyBarrette commented on July 18, 2024

Oh ok, I can see if I drop it does it actually create any issues

from hakai-api-client-matlab.

JessyBarrette avatar JessyBarrette commented on July 18, 2024

commenting this line in the code doesn't seem to have any effect on the execution at least locally on my machine. So I believe we could just drop it whatever it means

from hakai-api-client-matlab.

fostermh avatar fostermh commented on July 18, 2024

that is surprising as that line indicates which id to use when connecting to google authentication. you should not be able to authenticate with google without it. likely you have cached credentials on your system and you would be unable to connect tomorrow or whenever your cache times out.

from hakai-api-client-matlab.

JessyBarrette avatar JessyBarrette commented on July 18, 2024

from hakai-api-client-matlab.

fostermh avatar fostermh commented on July 18, 2024

I guess I'm wondering why this client has the client id hardcoded while the R and Python clients do not. Seems to me that they are using the API to authenticate while the matlab client is still using an older auth workflow? I would feel better about this if we were doing it consistently for all clients.

from hakai-api-client-matlab.

JessyBarrette avatar JessyBarrette commented on July 18, 2024

Strangely I think this is the most of recent out of the three πŸ˜†. Though I just, retried the client with a full cycle by regenerating a new credential and it this line is definitely unused. Plus I don't see anywhere in the code where it gets used at all.

from hakai-api-client-matlab.

fostermh avatar fostermh commented on July 18, 2024

that is strange but, ok. once the current files are cleaned up I will purge the offending data from the git history

from hakai-api-client-matlab.

tayden avatar tayden commented on July 18, 2024

That "id" is actually just the URL for our login page, for this particular app which is setup via the google cloud console. The same URL is used in the API here: https://github.com/HakaiInstitute/hakai-api/commit/1ac2fee173c7efc78678f735a8f6fb0e8abd7d05#diff-690cc16f20041b3b798a0470ccc33495bf1761ad2aed120e53e7065913205355L12 (note its different now because I broke the old a couple weeks ago and had to update it.)

So it looks like this is something leftover from when we had a less nice way to do auth than is setup now in the API. I assume it was defined here to access that URL directly, instead of through the proxy setup in hakai-api.

Anyway, it's not sensitive information. It should be removed but we don't have to worry about it being in there, especially since those old credentials were blown away when I broke and then fixed the auth flow 15 days ago.

from hakai-api-client-matlab.

tayden avatar tayden commented on July 18, 2024

The current flow of requests is as follows, just for clarity:

matlab client -> hecate.hakai.org/api/oauth2/client -> [...].apps.googleusercontent.com -> https://accounts.google.com/o/oauth2/v2/auth/oauthchooseaccount?[...] (which is the Google select account/sign in page)

Then after authenticating, it goes to:
hecate.hakai.org/api/oauth2/client/code2jwt which responds to the original requester with the JWT token to be saved locally

from hakai-api-client-matlab.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.