Skip to content
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

ENG: Add support JWT to authorise user inside the System #12

Open
bakulinav opened this issue Mar 16, 2018 · 5 comments
Open

ENG: Add support JWT to authorise user inside the System #12

bakulinav opened this issue Mar 16, 2018 · 5 comments

Comments

@bakulinav
Copy link
Owner

bakulinav commented Mar 16, 2018

Engine service (ENG) should support authorisation over JWT mechanism (RFC-7519).

A JWT token should include at least clientID to distiguish client's scope while ShoppingCart processing in rules engine processor. Also JWT token will have clientName attribute.
For current state of the project clientID1 and clientID2 stubs are available.

Make API service to send JWT to ENG service.
Use HS512 (HMAC using SHA-512) algorithm for JWT sign.

It should decline non-JWT requests.
It should decline requests having unknown clientID.

Update ENG Postman collections to use JWT auth.

@bakulinav
Copy link
Owner Author

JWT reference documentations is jwt.io

@bakulinav
Copy link
Owner Author

JWT support signing and encryption.
For purpose of research and reduce overhead encryption will not be use.
If possible, reduce signing of messages too as soon ENG and API modules communicates in trusted environment.

No sign.
No encryption.

@bakulinav
Copy link
Owner Author

JWT spec suppose recommended fields of a payload:
iss (issuer), exp (expiration time), sub (subject), aud (audience) and others.

Engine enough accept iss and exp to distinguish source of JWT (API or Postman) and expiration date.

@bakulinav
Copy link
Owner Author

bakulinav commented Mar 16, 2018

In Spring Boot the JWT could be implement like part of Spring Security starter (https://auth0.com/blog/securing-spring-boot-with-jwts/) but there is no build-in implementation of JWT. Instead, use community developed modules integrated with Spring Security.

@bakulinav
Copy link
Owner Author

There is no way to exclude signing process of JWT.
Use HS512 algorithm for JWT sign.

@bakulinav bakulinav changed the title ENG: Add support JWT for authorise user inside the System ENG: Add support JWT to authorise user inside the System Mar 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant