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

HTTP header values as extended policy conditions #1904

Merged
merged 7 commits into from Nov 18, 2019

Conversation

@cornelinux
Copy link
Member

cornelinux commented Oct 24, 2019

A policy can now have extended conditions based on
any arbitrary HTTP request header.

The functionality is similar to the extended userinfo
conditions. If a condition refers to a non-existing/missing
header an exception is raised.

Closes #1425

A policy can now have extended conditions based on
any arbitrary HTTP *request* header.

The functionality is similar to the extended userinfo
conditions. If a condition refers to a non-existing/missing
header an exception is raised.

Closes #1425
@cornelinux cornelinux requested a review from plettich Oct 24, 2019
Closes #1425
@codecov

This comment has been minimized.

Copy link

codecov bot commented Oct 24, 2019

Codecov Report

Merging #1904 into master will increase coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1904      +/-   ##
==========================================
+ Coverage   97.13%   97.16%   +0.02%     
==========================================
  Files         151      151              
  Lines       18484    18738     +254     
==========================================
+ Hits        17955    18207     +252     
- Misses        529      531       +2
Impacted Files Coverage Δ
privacyidea/api/policy.py 100% <ø> (ø) ⬆️
privacyidea/api/before_after.py 97.95% <100%> (ø) ⬆️
privacyidea/lib/policy.py 99.21% <100%> (+0.02%) ⬆️
privacyidea/api/validate.py 100% <100%> (ø) ⬆️
privacyidea/lib/tokenclass.py 98.74% <0%> (-0.06%) ⬇️
privacyidea/api/event.py 100% <0%> (ø) ⬆️
privacyidea/lib/tokens/hotptoken.py 100% <0%> (ø) ⬆️
privacyidea/lib/user.py 99.34% <0%> (+0.04%) ⬆️
privacyidea/api/auth.py 97.2% <0%> (+0.43%) ⬆️

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 b947392...4017700. Read the comment docs.

privacyidea/api/policy.py Outdated Show resolved Hide resolved
doc/policies/conditions.rst Show resolved Hide resolved
@plettich

This comment has been minimized.

Copy link
Member

plettich commented Nov 15, 2019

I'll also add some more tests for coverage, etc.

plettich and others added 3 commits Nov 15, 2019
@cornelinux cornelinux requested a review from plettich Nov 16, 2019
cornelinux and others added 2 commits Nov 16, 2019
Copy link
Member

plettich left a comment

Looks good

@plettich plettich merged commit 5701ca6 into master Nov 18, 2019
5 checks passed
5 checks passed
ci/circleci Your tests passed on CircleCI!
Details
codecov/patch 100% of diff hit (target 97.13%)
Details
codecov/project 97.16% (+0.02%) compared to b947392
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 1425/http_header_in_policy branch Nov 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.