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

outposts: allow force refresh #10375

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

outposts: allow force refresh #10375

wants to merge 3 commits into from

Conversation

rissson
Copy link
Member

@rissson rissson commented Jul 4, 2024

Details

REPLACE ME


Checklist

  • Local tests pass (ak test authentik/)
  • The code has been formatted (make lint-fix)

If an API change has been made

  • The API schema has been updated (make gen-build)

If changes to the frontend have been made

  • The code has been formatted (make web)

If applicable

  • The documentation has been updated
  • The documentation has been formatted (make website)

Signed-off-by: Marc 'risson' Schmitt <[email protected]>
@rissson rissson self-assigned this Jul 4, 2024
@rissson rissson requested review from a team as code owners July 4, 2024 13:55
Copy link

netlify bot commented Jul 4, 2024

Deploy Preview for authentik-storybook canceled.

Name Link
🔨 Latest commit bf9ac25
🔍 Latest deploy log https://app.netlify.com/sites/authentik-storybook/deploys/6686c615ec6d5b0007db70c0

Copy link

netlify bot commented Jul 4, 2024

Deploy Preview for authentik-docs ready!

Name Link
🔨 Latest commit bf9ac25
🔍 Latest deploy log https://app.netlify.com/sites/authentik-docs/deploys/6686c61540420c0008ade731
😎 Deploy Preview https://deploy-preview-10375--authentik-docs.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 configuration.

Copy link

codecov bot commented Jul 4, 2024

Codecov Report

Attention: Patch coverage is 75.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 92.60%. Comparing base (fbad6fb) to head (bf9ac25).
Report is 2 commits behind head on main.

Files Patch % Lines
authentik/outposts/api/outposts.py 72.72% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10375      +/-   ##
==========================================
- Coverage   92.63%   92.60%   -0.04%     
==========================================
  Files         713      713              
  Lines       34988    35000      +12     
==========================================
  Hits        32411    32411              
- Misses       2577     2589      +12     
Flag Coverage Δ
e2e 49.57% <75.00%> (+0.01%) ⬆️
integration 25.37% <8.33%> (-0.01%) ⬇️
unit 90.11% <75.00%> (-0.01%) ⬇️

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

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

Copy link
Contributor

github-actions bot commented Jul 4, 2024

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-ghcr.io/goauthentik/dev-server:gh-bf9ac257402d7aacc484a95ecb6d3e04ed9caeae
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-ghcr.io/goauthentik/dev-server:gh-bf9ac257402d7aacc484a95ecb6d3e04ed9caeae-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-ghcr.io/goauthentik/dev-server:gh-bf9ac257402d7aacc484a95ecb6d3e04ed9caeae

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-ghcr.io/goauthentik/dev-server:gh-bf9ac257402d7aacc484a95ecb6d3e04ed9caeae-arm64

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

Co-authored-by: Jens L. <[email protected]>
Signed-off-by: Marc 'risson' Schmitt <[email protected]>
@action(detail=True, methods=["POST"])
def force_refresh(self, request: Request, pk: int) -> Response:
"""Force an outpost to refresh its configuration. Will also clear its cache."""
outpost: Outpost = self.get_object()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since the action is POST, it'll require the permission authentik_outposts.change_outpost by default

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh yeah I added the permission but forgot to specify it, and to run the migrations 🤡

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added the migration. How do you propose we handle the permissions thing?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There was some way to specify that the "implied" permissions from the HTTP verb are not required, but I honestly cannot remember how that was done

Signed-off-by: Marc 'risson' Schmitt <[email protected]>
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.

2 participants