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

OIDC Provider : Incorrect error if scopes do not match security requirement #661

Closed
asantaga opened this issue May 8, 2019 · 0 comments
Closed
Assignees
Labels
bug Something isn't working SE security

Comments

@asantaga
Copy link
Contributor

asantaga commented May 8, 2019

Environment Details

  • Helidon Version: 1.0.3
  • Helidon SE
  • JDK version: 1.8.0_211
  • OS: Windows
  • Docker version (if applicable):

Problem Description

Scenario
Using idcs-login example, the rest service is protected with TWO scopes.
If you generate a auth token from IDCS with only one scope and then execute the REST Service with this token you will get this error

FINEST: FAILURE authn.authenticate 802e3482-81d6-45ce-8d46-b819b350e7e7:y  io.helidon.security.AuthenticationClientImpl lambda$authenticate$6 AuthenticationClientImpl.java 118 :: "Provider io.helidon.security.providers.oidc.OidcProvider. Message: Missing token, redirecting to identity server"

Steps to reproduce

  1. Deploy sample application ensure it works from a browser
  2. Use a tool (like postman) to generate a Auth token from idcs using the https:///oauth2/v1/token rest call. Ensure you only have one scope (first_scope)
  3. Execute this against the REST endpoint (/jersey)
  4. you wull receive the above error
  5. Regenerate the token using two scopes
  6. Execute again, and it should work.

The error message is incorrect and should be valid token , invalid scopes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working SE security
Projects
Archived in project
Development

No branches or pull requests

2 participants