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

Gracefully handle missing and invalid idtoken #292

Conversation

michael-doubez
Copy link
Contributor

@michael-doubez michael-doubez commented Apr 8, 2024

Plugin should not assume provider is compliant:

  • missing idtoken should be reported with relevant localized error message.
  • username field should never be null (default to "sub") and if not found, localized message to be displayed

Testing done

Submitter checklist

Edit tasklist title
Beta Give feedback Tasklist Submitter checklist, more options

Delete tasklist

Delete tasklist block?
Are you sure? All relationships in this tasklist will be removed.
  1. Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
    Options
  2. Ensure that the pull request title represents the desired changelog entry
    Options
  3. Please describe what you did
    Options
  4. Link to relevant issues in GitHub or Jira
    Options
  5. Link to relevant pull requests, esp. upstream and downstream changes
    Options
  6. Ensure you have provided tests - that demonstrates feature works or fixes the issue
    Options

@michael-doubez michael-doubez linked an issue Apr 8, 2024 that may be closed by this pull request
@michael-doubez michael-doubez self-assigned this Apr 8, 2024
@michael-doubez
Copy link
Contributor Author

Fixes #213

Copy link

codecov bot commented Apr 8, 2024

Codecov Report

Attention: Patch coverage is 82.75862% with 5 lines in your changes are missing coverage. Please review.

Project coverage is 73.71%. Comparing base (c3d9244) to head (ed221ad).
Report is 4 commits behind head on master.

Files Patch % Lines
...va/org/jenkinsci/plugins/oic/OicSecurityRealm.java 88.88% 3 Missing ⚠️
...va/org/jenkinsci/plugins/oic/OicTokenResponse.java 0.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master     #292      +/-   ##
============================================
+ Coverage     73.16%   73.71%   +0.54%     
- Complexity      189      194       +5     
============================================
  Files             9        9              
  Lines           775      814      +39     
  Branches        113      115       +2     
============================================
+ Hits            567      600      +33     
- Misses          151      157       +6     
  Partials         57       57              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@michael-doubez michael-doubez force-pushed the 271-what-does-tokenstring-is-null-means branch from ed9b373 to 6b62545 Compare April 9, 2024 20:10
@michael-doubez michael-doubez merged commit 325750a into jenkinsci:master Apr 9, 2024
18 checks passed
@michael-doubez michael-doubez deleted the 271-what-does-tokenstring-is-null-means branch April 9, 2024 21:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant