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

Flexible jwt #2131

Merged
merged 3 commits into from Mar 25, 2020
Merged

Flexible jwt #2131

merged 3 commits into from Mar 25, 2020

Conversation

@cornelinux
Copy link
Member

cornelinux commented Mar 24, 2020

No description provided.

cornelinux added 2 commits Mar 23, 2020
The TRUSTED_JWT definition in pi.cfg can now contain
a regular expression. This way a private signing key
can be used to create JWTs for many different users
in one realm.
The regular expression of the username should work
this way, that it does exact matching from the
beginning to the end.
If the admin wants to match in the middle of the username
the username should be prepended or suffixed with .* like
.*match.*
@cornelinux cornelinux requested a review from plettich Mar 24, 2020
Copy link
Member

plettich left a comment

Looks good, please see my comment.

privacyidea/api/lib/utils.py Outdated Show resolved Hide resolved
If the regular expression of user name in TRUSTED_JWT
does not match, we include the failed username in the
exception to provide better readability of log files
and response values.
@codecov

This comment has been minimized.

Copy link

codecov bot commented Mar 25, 2020

Codecov Report

Merging #2131 into master will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2131   +/-   ##
=======================================
  Coverage   96.39%   96.39%           
=======================================
  Files         157      157           
  Lines       19673    19678    +5     
=======================================
+ Hits        18963    18968    +5     
  Misses        710      710           
Impacted Files Coverage Δ
privacyidea/config.py 100.00% <ø> (ø)
privacyidea/api/lib/utils.py 97.88% <100.00%> (+0.07%) ⬆️
privacyidea/lib/resolver.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5805b52...fb73dac. Read the comment docs.

@cornelinux cornelinux requested a review from plettich Mar 25, 2020
Copy link
Member

plettich left a comment

Looks good

@plettich plettich merged commit e6bb0a1 into master Mar 25, 2020
6 checks passed
6 checks passed
runner / codespell
Details
ci/circleci: build Your tests passed on CircleCI!
Details
codecov/patch 100.00% of diff hit (target 96.39%)
Details
codecov/project 96.39% (+0.00%) compared to 7b7a750
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
@plettich plettich deleted the flexible-jwt branch Mar 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.