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

policies: provider raw result for better policy reusability #5189

Merged
merged 2 commits into from Apr 6, 2023

Conversation

BeryJu
Copy link
Member

@BeryJu BeryJu commented Apr 5, 2023

return the raw policy result within a PolicyResult object
also make ak_call_policy available for property mappings

closes #4842

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
@netlify
Copy link

netlify bot commented Apr 5, 2023

Deploy Preview for authentik ready!

Name Link
🔨 Latest commit 3646b1c
🔍 Latest deploy log https://app.netlify.com/sites/authentik/deploys/642dde2e989754000880a3a9
😎 Deploy Preview https://deploy-preview-5189--authentik.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@BeryJu BeryJu changed the title policies: raw result policies: provider raw result for better policy reusability Apr 5, 2023
@codecov
Copy link

codecov bot commented Apr 5, 2023

Codecov Report

Patch coverage: 96.97% and project coverage change: -0.45 ⚠️

Comparison is base (c117d98) 92.74% compared to head (3646b1c) 92.29%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5189      +/-   ##
==========================================
- Coverage   92.74%   92.29%   -0.45%     
==========================================
  Files         506      506              
  Lines       25829    25846      +17     
==========================================
- Hits        23953    23852     -101     
- Misses       1876     1994     +118     
Flag Coverage Δ
e2e 51.11% <24.25%> (-1.57%) ⬇️
integration 26.35% <18.19%> (-<0.01%) ⬇️
unit 89.57% <96.97%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
authentik/lib/expression/evaluator.py 73.76% <93.34%> (+2.11%) ⬆️
authentik/core/tests/test_property_mapping.py 100.00% <100.00%> (ø)
authentik/policies/expression/evaluator.py 93.62% <100.00%> (+0.64%) ⬆️
authentik/policies/types.py 100.00% <100.00%> (ø)

... and 19 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@github-actions
Copy link
Contributor

github-actions bot commented Apr 5, 2023

authentik PR Installation instructions

Instructions for docker-compose

Add the following block to your .env file:

AUTHENTIK_IMAGE=ghcr.io/goauthentik/dev-server
AUTHENTIK_TAG=gh-policies-raw_result-1680728185-5b0c92a
AUTHENTIK_OUTPOSTS__CONTAINER_IMAGE_BASE=ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s

For arm64, use these values:

AUTHENTIK_IMAGE=ghcr.io/goauthentik/dev-server
AUTHENTIK_TAG=gh-policies-raw_result-1680728185-5b0c92a-arm64
AUTHENTIK_OUTPOSTS__CONTAINER_IMAGE_BASE=ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s

Afterwards, run the upgrade commands from the latest release notes.

Instructions for Kubernetes

Add the following block to your values.yml file:

authentik:
    outposts:
        container_image_base: ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s
image:
    repository: ghcr.io/goauthentik/dev-server
    tag: gh-policies-raw_result-1680728185-5b0c92a

For arm64, use these values:

authentik:
    outposts:
        container_image_base: ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s
image:
    repository: ghcr.io/goauthentik/dev-server
    tag: gh-policies-raw_result-1680728185-5b0c92a-arm64

Afterwards, run the upgrade commands from the latest release notes.

@BeryJu BeryJu merged commit 977757f into main Apr 6, 2023
53 of 54 checks passed
@BeryJu BeryJu deleted the policies/raw_result branch April 6, 2023 07:42
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

Successfully merging this pull request may close these issues.

Global python functions/vars for expression policies
1 participant