-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Research Feide API Gatekeeper #2484
Comments
In the Feide docs for jwt token stuff there is a scary line:
|
JWT with FeideCompilation of data from feide docs and some stuff i figured out myself Generating JWT tokensClient tokensThe easiest way to get a JWT token is to authenticate as a client. A client in this case refers to an Application registered in dataporten. This requires you to know the First, in order to get an
Expected output:
I think the This Another thing you need to know is what scopes you want to request. These are added to the request with the After configuring all these things the request should look like this:
The response should then look something like this:
The JWT token itself is the value under Header:
Body:
User tokensClients related to users are a bit more difficult to generate. It requires you to do the whole browser-based authentication when you refer back and forth with Feide and the user logs in with 2FA. Validating JWT token from feidePer the Oatuh specification, information for various stuff related to the Oauth service can be found under the Verifying JWT tokenThe JWT token header contains a Verifying issuerIt is important to verify the issuer to make sure that the token was actually created by someone you trust (in this case Feide). Verifying audienceYou should also make sure that the token is actually made specifically for your application. If you dont check this, then any other token generated by Feide for some other API can also be used to access your API. You should check that the Validate expiry timeCheck the expiry time defined by the Validate not-beforeCheck the time defined by the |
A NAV admin must also be able to configure NAV to trust JWTs that are signed by a third party - like adding a trusted public key to a config option in webfront.conf
As we have funds to connect with the Feide API Gatekeeper that's an obvious place to start.
The text was updated successfully, but these errors were encountered: