forked from coop-cloud/authentik
Compare commits
1 Commits
6.3.1+2024
...
event_dele
Author | SHA1 | Date | |
---|---|---|---|
93f9a7b4d7 |
@ -17,9 +17,6 @@ AUTHENTIK_LOG_LEVEL=info
|
|||||||
## Outpost Integration
|
## Outpost Integration
|
||||||
# COMPOSE_FILE="$COMPOSE_FILE:compose.outposts.yml"
|
# COMPOSE_FILE="$COMPOSE_FILE:compose.outposts.yml"
|
||||||
|
|
||||||
## ADMIN
|
|
||||||
AUTHENTIK_BOOTSTRAP_EMAIL=admin@example.com
|
|
||||||
|
|
||||||
## EMAIL
|
## EMAIL
|
||||||
AUTHENTIK_EMAIL__HOST=smtp
|
AUTHENTIK_EMAIL__HOST=smtp
|
||||||
AUTHENTIK_EMAIL__PORT=587
|
AUTHENTIK_EMAIL__PORT=587
|
||||||
@ -96,13 +93,13 @@ AUTHENTIK_COLOR_BACKGROUND_LIGHT=#1c1e21
|
|||||||
# KIMAI_DOMAIN=kimai.example.com
|
# KIMAI_DOMAIN=kimai.example.com
|
||||||
# SECRET_KIMAI_ID_VERSION=v1
|
# SECRET_KIMAI_ID_VERSION=v1
|
||||||
# SECRET_KIMAI_SECRET_VERSION=v1
|
# SECRET_KIMAI_SECRET_VERSION=v1
|
||||||
# APP_ICONS="$APP_ICONS kimai:~/.abra/recipes/authentik/icons/kimai_logo.png"
|
# APP_ICONS="$APP_ICONS kimai:~/.abra/recipes/authentik/icons/kimai.png"
|
||||||
|
|
||||||
# COMPOSE_FILE="$COMPOSE_FILE:compose.monitoring.yml"
|
# COMPOSE_FILE="$COMPOSE_FILE:compose.monitoring.yml"
|
||||||
# MONITORING_DOMAIN=monitoring.example.com
|
# MONITORING_DOMAIN=monitoring.example.com
|
||||||
# SECRET_MONITORING_ID_VERSION=v1
|
# SECRET_MONITORING_ID_VERSION=v1
|
||||||
# SECRET_MONITORING_SECRET_VERSION=v1
|
# SECRET_MONITORING_SECRET_VERSION=v1
|
||||||
# APP_ICONS="$APP_ICONS monitoring:~/.abra/recipes/authentik/icons/monitoring.svg"
|
# APP_ICONS="$APP_ICONS monitoring:~/.abra/recipes/authentik/icons/monitoring.png"
|
||||||
|
|
||||||
# COMPOSE_FILE="$COMPOSE_FILE:compose.rallly.yml"
|
# COMPOSE_FILE="$COMPOSE_FILE:compose.rallly.yml"
|
||||||
# RALLLY_DOMAIN=rallly.example.com
|
# RALLLY_DOMAIN=rallly.example.com
|
||||||
|
2
abra.sh
2
abra.sh
@ -14,7 +14,7 @@ export OUTLINE_CONFIG_VERSION=v2
|
|||||||
export KIMAI_CONFIG_VERSION=v1
|
export KIMAI_CONFIG_VERSION=v1
|
||||||
export RALLLY_CONFIG_VERSION=v2
|
export RALLLY_CONFIG_VERSION=v2
|
||||||
export HEDGEDOC_CONFIG_VERSION=v1
|
export HEDGEDOC_CONFIG_VERSION=v1
|
||||||
export MONITORING_CONFIG_VERSION=v2
|
export MONITORING_CONFIG_VERSION=v1
|
||||||
export DB_ENTRYPOINT_VERSION=v1
|
export DB_ENTRYPOINT_VERSION=v1
|
||||||
|
|
||||||
customize() {
|
customize() {
|
||||||
|
@ -40,7 +40,7 @@ vikunja:
|
|||||||
- vikunja.svg
|
- vikunja.svg
|
||||||
secrets:
|
secrets:
|
||||||
vikunja_id: vikunja
|
vikunja_id: vikunja
|
||||||
monitoring-ng:
|
monitoring:
|
||||||
uncomment:
|
uncomment:
|
||||||
- compose.monitoring.yml
|
- compose.monitoring.yml
|
||||||
- MONITORING_DOMAIN
|
- MONITORING_DOMAIN
|
||||||
|
22
compose.yml
22
compose.yml
@ -21,7 +21,6 @@ x-env: &env
|
|||||||
- AUTHENTIK_COLOR_BACKGROUND_LIGHT
|
- AUTHENTIK_COLOR_BACKGROUND_LIGHT
|
||||||
- AUTHENTIK_FOOTER_LINKS
|
- AUTHENTIK_FOOTER_LINKS
|
||||||
- AUTHENTIK_IMPERSONATION
|
- AUTHENTIK_IMPERSONATION
|
||||||
- AUTHENTIK_BOOTSTRAP_EMAIL
|
|
||||||
- WELCOME_MESSAGE
|
- WELCOME_MESSAGE
|
||||||
- DEFAULT_LANGUAGE
|
- DEFAULT_LANGUAGE
|
||||||
- EMAIL_SUBJECT
|
- EMAIL_SUBJECT
|
||||||
@ -33,7 +32,7 @@ x-env: &env
|
|||||||
version: '3.8'
|
version: '3.8'
|
||||||
services:
|
services:
|
||||||
app:
|
app:
|
||||||
image: ghcr.io/goauthentik/server:2024.6.2
|
image: ghcr.io/goauthentik/server:2024.4.2
|
||||||
command: server
|
command: server
|
||||||
depends_on:
|
depends_on:
|
||||||
- db
|
- db
|
||||||
@ -52,13 +51,16 @@ services:
|
|||||||
- internal
|
- internal
|
||||||
- proxy
|
- proxy
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: "ak healthcheck"
|
test: "bash -c 'printf \"GET / HTTP/1.1\n\n\" > /dev/tcp/127.0.0.1/9000; exit $$?;'"
|
||||||
interval: 30s
|
interval: 30s
|
||||||
timeout: 30s
|
timeout: 10s
|
||||||
retries: 10
|
retries: 10
|
||||||
start_period: 5m
|
start_period: 5m
|
||||||
environment: *env
|
environment: *env
|
||||||
deploy:
|
deploy:
|
||||||
|
update_config:
|
||||||
|
failure_action: rollback
|
||||||
|
order: start-first
|
||||||
labels:
|
labels:
|
||||||
- "traefik.enable=true"
|
- "traefik.enable=true"
|
||||||
- "traefik.docker.network=proxy"
|
- "traefik.docker.network=proxy"
|
||||||
@ -71,11 +73,11 @@ services:
|
|||||||
- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLHost=${DOMAIN}"
|
- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLHost=${DOMAIN}"
|
||||||
- "traefik.http.middlewares.${STACK_NAME}-frameOptions.headers.customFrameOptionsValue=SAMEORIGIN"
|
- "traefik.http.middlewares.${STACK_NAME}-frameOptions.headers.customFrameOptionsValue=SAMEORIGIN"
|
||||||
- "traefik.http.middlewares.${STACK_NAME}-frameOptions.headers.contentSecurityPolicy=frame-ancestors ${X_FRAME_OPTIONS_ALLOW_FROM}"
|
- "traefik.http.middlewares.${STACK_NAME}-frameOptions.headers.contentSecurityPolicy=frame-ancestors ${X_FRAME_OPTIONS_ALLOW_FROM}"
|
||||||
- "coop-cloud.${STACK_NAME}.version=6.3.1+2024.6.2"
|
- "coop-cloud.${STACK_NAME}.version=6.1.1+2024.4.2"
|
||||||
- "coop-cloud.${STACK_NAME}.timeout=${TIMEOUT:-120}"
|
- "coop-cloud.${STACK_NAME}.timeout=${TIMEOUT:-120}"
|
||||||
|
|
||||||
worker:
|
worker:
|
||||||
image: ghcr.io/goauthentik/server:2024.6.2
|
image: ghcr.io/goauthentik/server:2024.4.2
|
||||||
command: worker
|
command: worker
|
||||||
depends_on:
|
depends_on:
|
||||||
- db
|
- db
|
||||||
@ -108,12 +110,6 @@ services:
|
|||||||
- source: flow_invalidation
|
- source: flow_invalidation
|
||||||
target: /blueprints/6_flow_invalidation.yaml
|
target: /blueprints/6_flow_invalidation.yaml
|
||||||
environment: *env
|
environment: *env
|
||||||
healthcheck:
|
|
||||||
test: "ak healthcheck"
|
|
||||||
interval: 30s
|
|
||||||
timeout: 30s
|
|
||||||
retries: 10
|
|
||||||
start_period: 5m
|
|
||||||
|
|
||||||
db:
|
db:
|
||||||
image: postgres:15.7
|
image: postgres:15.7
|
||||||
@ -147,7 +143,7 @@ services:
|
|||||||
backupbot.backup.path: "/var/lib/postgresql/data"
|
backupbot.backup.path: "/var/lib/postgresql/data"
|
||||||
|
|
||||||
redis:
|
redis:
|
||||||
image: redis:7.4.0-alpine
|
image: redis:7.2.4-alpine
|
||||||
networks:
|
networks:
|
||||||
- internal
|
- internal
|
||||||
healthcheck:
|
healthcheck:
|
||||||
|
19
delete_user.py
Normal file
19
delete_user.py
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
model_actions = ["model_deleted"]
|
||||||
|
model_app = "authentik_core"
|
||||||
|
model_name = "user"
|
||||||
|
|
||||||
|
event = request.context.get("event", None)
|
||||||
|
if not event:
|
||||||
|
ak_logger.info("delete_user: No event")
|
||||||
|
return False
|
||||||
|
if event.action not in model_actions:
|
||||||
|
ak_logger.info("delete_user: Non-matching action")
|
||||||
|
return False
|
||||||
|
if (
|
||||||
|
event.context["model"]["app"] != model_app
|
||||||
|
or event.context["model"]["model_name"] != model_name
|
||||||
|
):
|
||||||
|
ak_logger.info("delete_user: Invalid model")
|
||||||
|
return False
|
||||||
|
|
||||||
|
ak_logger.info(f'model: {event.context["model"]}')
|
@ -25,7 +25,7 @@ entries:
|
|||||||
conditions: []
|
conditions: []
|
||||||
id: monitoring_provider
|
id: monitoring_provider
|
||||||
identifiers:
|
identifiers:
|
||||||
pk: 9990
|
pk: 9994
|
||||||
model: authentik_providers_oauth2.oauth2provider
|
model: authentik_providers_oauth2.oauth2provider
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user