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

47 feature add proper account management for backend components #159

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

Conversation

pulsargranular
Copy link
Collaborator

No description provided.

@pulsargranular
Copy link
Collaborator Author

Be aware that a new secret is needed: .secrets/authentik_token

@@ -33,6 +33,7 @@ MINIO_LANDINGZONE_BUCKET="landingzone"
MINIO_STAGING_BUCKET="staging"
MINIO_ENDPOINT="scopem-openemdata.ethz.ch:9090"
MINIO_EXTERNAL_ENDPOINT="scopem-openemdata.ethz.ch:9090"
MINIO_MIDDLEWARES=minio-stripprefix,minio-headers,minio-cors,authentik
Copy link
Collaborator

Choose a reason for hiding this comment

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

Minio is not deployed in prod so this does not make sense here

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ok, true.


# Omit authentik as a middleware that protects access to dashboards
MINIO_MIDDLEWARES=minio-stripprefix,minio-headers,minio-cors
Copy link
Collaborator

Choose a reason for hiding this comment

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

Not a fan of having the the usage of the middlewares here but the definition of them in the docker compose. What about

#.env.prod:
FORWARD_AUTH_MIDDLEWARE=authentik

#.env.development:
FORWARD_AUTH_MIDDLEWARE=""

# .docker-compose.yml
- "traefik.http.routers.prefect-server.middlewares=${FORWARD_AUTH_MIDDLEWARE}"

@@ -51,7 +52,14 @@ PREFECT_JOB_TEMPLATE=prefect-jobtemplate-prod.json
PREFECT_ARCHIVAL_WORKPOOL_NAME=archival-docker-workpool
# Workpool name for retrieval jobs
PREFECT_RETRIEVAL_WORKPOOL_NAME=retrieval-docker-workpool
# Protect UI
PREFECT_UI_MIDDLEWARES=authentik
Copy link
Collaborator

Choose a reason for hiding this comment

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

The API route should probably be removed from traefik - should only be access from the archiver api service from within

@@ -78,6 +78,7 @@ services:
- "traefik.http.routers.prefect-server.entrypoints=websecure"
- "traefik.http.routers.prefect-server.tls"
- "traefik.http.services.prefect-server.loadbalancer.server.port=4200"
- "traefik.http.routers.prefect-server.middlewares=${PREFECT_UI_MIDDLEWARES}"

- "traefik.http.routers.prefect-api-server.rule=Host(`${HOST}`) && PathPrefix(`/archiver/prefect/api`)"
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this route can be removed; the api service should communicate directly with this service and not through traefik

environment:
AUTHENTIK_HOST: ${AUTHENTIK_HOST}
AUTHENTIK_INSECURE: ${AUTHENTIK_INSECURE}
AUTHENTIK_TOKEN:
Copy link
Collaborator

Choose a reason for hiding this comment

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

needed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

technically not really. It is more of a comment that these three env variables are needed.


AUTHENTIK_HOST=https://authentik.ethz.ch
# Check whether the Authentik infrastructure uses a self-signed certificate (true) or not
AUTHENTIK_INSECURE=true
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this correct in prod? Sounds wrong. Doesn't just the correct root cert need to be added to the container?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yes, it should be correctly signed. But at the moment it seems not to be the case:

image

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.

[Feature] Add proper account management for backend components
2 participants