From 34296cf402a0adf8eeb4ebbe256b849dbf8d6e81 Mon Sep 17 00:00:00 2001 From: carla Date: Tue, 6 May 2025 14:37:08 +0200 Subject: [PATCH 1/2] feature(Group External Apps): Added group ens and updated abra for applications --- .env.sample | 9 ++++++++- abra.sh | 7 +++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/.env.sample b/.env.sample index 9f44063..e44f951 100644 --- a/.env.sample +++ b/.env.sample @@ -64,6 +64,13 @@ COPY_ASSETS="$COPY_ASSETS icon.png|app:/web/dist/assets/icons/" # BACKGROUND_BOX_COLOR='#eaeaeacf' # THEME_BACKGROUND="url('https://authentik.example.com/static/dist/assets/images/flow_background.jpg'); background-position: center; background-repeat: no-repeat; background-size: cover;" +# Group Name Variables to cluster Applications +# GROUP_HELP=Hilfe +# GROUP_ORGANISATION=Organisation +# GROUP_COMMUNICATION=Communication +# GROUP_COLLABORATION=Collaboration +# GROUP_DOCUMENTATION=Documentation + # COMPOSE_FILE="$COMPOSE_FILE:compose.nextcloud.yml" # NEXTCLOUD_DOMAIN=nextcloud.example.com # SECRET_NEXTCLOUD_ID_VERSION=v1 @@ -130,5 +137,5 @@ COPY_ASSETS="$COPY_ASSETS icon.png|app:/web/dist/assets/icons/" # SECRET_HEDGEDOC_SECRET_VERSION=v1 # APP_ICONS="$APP_ICONS hedgedoc:~/.abra/recipes/authentik/icons/hedgedoc.png" -# APPLICATIONS='{"Calendar": "https://nextcloud.example.com/apps/calendar/", "BBB": "https://nextcloud.example.com/apps/bbb/", "Pretix": "https://pretix.example.com/control/"}' +# APPLICATIONS='{"Calendar": {"url":"https://nextcloud.example.com/apps/calendar/", "group": "$GROUP_ORGANISATION"}, "BBB": {"url":"https://nextcloud.example.com/apps/bbb/", "group":"$GROUP_COMMUNICATION"}, "Pretix": {"url":"https://pretix.example.com/control/", "group":"$GROUP_ORGANISATION"}}' # EXTRA_ICONS={"Calendar": "~/.abra/recipes/authentik/icons/calendar.svg", "BBB": "~/.abra/recipes/authentik/icons/bbb.png", "Pretix": "~/.abra/recipes/authentik/icons/pretix.svg"} diff --git a/abra.sh b/abra.sh index 5035bc9..1ebc799 100644 --- a/abra.sh +++ b/abra.sh @@ -185,14 +185,17 @@ import os if os.environ['APPLICATIONS'] == '': exit() applications = json.loads(os.environ['APPLICATIONS']) -for name, url in applications.items(): - print(f'Add {name}: {url}') +for name, details in applications.items(): + url = details['url'] + group = details['group'] + print(f'Add {name}: {url} in group: {group}') app = Application.objects.filter(name=name).first() if not app: app = Application() app.name = name app.slug = name.replace(' ', '-') app.meta_launch_url = url + app.group = group app.open_in_new_tab = True app.save() """ 2>&1 | quieten -- 2.47.2 From 3c355e96168166582831cba15f0a8588cc6ffd54 Mon Sep 17 00:00:00 2001 From: carla Date: Tue, 6 May 2025 15:02:38 +0200 Subject: [PATCH 2/2] feature(Group Internal Apps): added group attr and envs for internal apps --- .env.sample | 16 +++++++++++++++- compose.hedgedoc.yml | 3 ++- compose.kimai.yml | 1 + compose.matrix.yml | 2 +- compose.monitoring.yml | 4 ++-- compose.nextcloud.yml | 2 +- compose.outline.yml | 2 +- compose.rallly.yml | 2 +- compose.vikunja.yml | 2 +- compose.wekan.yml | 2 +- compose.wordpress.yml | 2 +- compose.zammad.yml | 1 + hedgedoc.yaml.tmpl | 1 + kimai.yaml.tmpl | 1 + matrix.yaml.tmpl | 1 + monitoring.yaml.tmpl | 3 ++- nextcloud.yaml.tmpl | 1 + outline.yaml.tmpl | 1 + rallly.yaml.tmpl | 1 + vikunja.yaml.tmpl | 1 + wekan.yaml.tmpl | 1 + wordpress.yaml.tmpl | 1 + zammad.yaml.tmpl | 1 + 23 files changed, 40 insertions(+), 12 deletions(-) diff --git a/.env.sample b/.env.sample index e44f951..458ef51 100644 --- a/.env.sample +++ b/.env.sample @@ -65,17 +65,21 @@ COPY_ASSETS="$COPY_ASSETS icon.png|app:/web/dist/assets/icons/" # THEME_BACKGROUND="url('https://authentik.example.com/static/dist/assets/images/flow_background.jpg'); background-position: center; background-repeat: no-repeat; background-size: cover;" # Group Name Variables to cluster Applications -# GROUP_HELP=Hilfe +# GROUP_SUPPORT=Support +# GROUP_HELP=Help # GROUP_ORGANISATION=Organisation # GROUP_COMMUNICATION=Communication # GROUP_COLLABORATION=Collaboration # GROUP_DOCUMENTATION=Documentation +# GROUP_DEVELOPMENT=Development +# GROUP_INFRASTRUCTURE=Infrastructure # COMPOSE_FILE="$COMPOSE_FILE:compose.nextcloud.yml" # NEXTCLOUD_DOMAIN=nextcloud.example.com # SECRET_NEXTCLOUD_ID_VERSION=v1 # SECRET_NEXTCLOUD_SECRET_VERSION=v1 # APP_ICONS="nextcloud:~/.abra/recipes/authentik/icons/nextcloud.png" +# NEXTCLOUD_APPGROUP="$GROUP_ORGANISATION" # COMPOSE_FILE="$COMPOSE_FILE:compose.wordpress.yml" # WORDPRESS_DOMAIN=wordpress.example.com @@ -83,6 +87,7 @@ COPY_ASSETS="$COPY_ASSETS icon.png|app:/web/dist/assets/icons/" # SECRET_WORDPRESS_ID_VERSION=v1 # SECRET_WORDPRESS_SECRET_VERSION=v1 # APP_ICONS="$APP_ICONS wordpress:~/.abra/recipes/authentik/icons/wordpress.png" +# WORDPRESS_APPGROUP="$GROUP_DEVELOPMENT" # COMPOSE_FILE="$COMPOSE_FILE:compose.matrix.yml" # ELEMENT_DOMAIN=element-web.example.com @@ -90,52 +95,61 @@ COPY_ASSETS="$COPY_ASSETS icon.png|app:/web/dist/assets/icons/" # SECRET_MATRIX_ID_VERSION=v1 # SECRET_MATRIX_SECRET_VERSION=v1 # APP_ICONS="$APP_ICONS matrix:~/.abra/recipes/authentik/icons/matrix.svg" +# MATRIX_APPGROUP="$GROUP_COMMUNICATION" # COMPOSE_FILE="$COMPOSE_FILE:compose.wekan.yml" # WEKAN_DOMAIN=wekan.example.com # SECRET_WEKAN_ID_VERSION=v1 # SECRET_WEKAN_SECRET_VERSION=v1 # APP_ICONS="$APP_ICONS wekan:~/.abra/recipes/authentik/icons/wekan.png" +# WEKAN_APPGROUP="$GROUP_ORGANISATION" # COMPOSE_FILE="$COMPOSE_FILE:compose.vikunja.yml" # VIKUNJA_DOMAIN=vikunja.example.com # SECRET_VIKUNJA_ID_VERSION=v1 # SECRET_VIKUNJA_SECRET_VERSION=v1 # APP_ICONS="$APP_ICONS vikunja:~/.abra/recipes/authentik/icons/vikunja.svg" +# VIKUNJA_APPGROUP="$GROUP_ORGANISATION" # COMPOSE_FILE="$COMPOSE_FILE:compose.outline.yml" # OUTLINE_DOMAIN=outline.example.com # SECRET_OUTLINE_ID_VERSION=v1 # SECRET_OUTLINE_SECRET_VERSION=v1 # APP_ICONS="$APP_ICONS outline:~/.abra/recipes/authentik/icons/outline.png" +# OUTLINE_APPGROUP="$GROUP_DOCUMENTATION" # COMPOSE_FILE="$COMPOSE_FILE:compose.kimai.yml" # KIMAI_DOMAIN=kimai.example.com # SECRET_KIMAI_ID_VERSION=v1 # SECRET_KIMAI_SECRET_VERSION=v1 # APP_ICONS="$APP_ICONS kimai:~/.abra/recipes/authentik/icons/kimai_logo.png" +# KIMAI_APPGROUP="$GROUP_ORGANISATION" # COMPOSE_FILE="$COMPOSE_FILE:compose.zammad.yml" # ZAMMAD_DOMAIN=zammad.example.com # APP_ICONS="$APP_ICONS zammad:~/.abra/recipes/authentik/icons/zammad.svg" +# ZAMMAD_APPGROUP="$GROUP_SUPPORT" # COMPOSE_FILE="$COMPOSE_FILE:compose.monitoring.yml" # MONITORING_DOMAIN=monitoring.example.com # SECRET_MONITORING_ID_VERSION=v1 # SECRET_MONITORING_SECRET_VERSION=v1 # APP_ICONS="$APP_ICONS monitoring:~/.abra/recipes/authentik/icons/monitoring.svg" +# MONITORING_APPGROUP="$GROUP_INFRASTRUCTURE" # COMPOSE_FILE="$COMPOSE_FILE:compose.rallly.yml" # RALLLY_DOMAIN=rallly.example.com # SECRET_RALLLY_ID_VERSION=v1 # SECRET_RALLLY_SECRET_VERSION=v1 # APP_ICONS="$APP_ICONS rallly:~/.abra/recipes/authentik/icons/rallly.png" +# RALLLY_APPGROUP="$GROUP_ORGANISATION" # COMPOSE_FILE="$COMPOSE_FILE:compose.hedgedoc.yml" # HEDGEDOC_DOMAIN=hedgedoc.example.com # SECRET_HEDGEDOC_ID_VERSION=v1 # SECRET_HEDGEDOC_SECRET_VERSION=v1 # APP_ICONS="$APP_ICONS hedgedoc:~/.abra/recipes/authentik/icons/hedgedoc.png" +# HEDGEDOC_APPGROUP="$GROUP_DOCUMENTATION" # APPLICATIONS='{"Calendar": {"url":"https://nextcloud.example.com/apps/calendar/", "group": "$GROUP_ORGANISATION"}, "BBB": {"url":"https://nextcloud.example.com/apps/bbb/", "group":"$GROUP_COMMUNICATION"}, "Pretix": {"url":"https://pretix.example.com/control/", "group":"$GROUP_ORGANISATION"}}' # EXTRA_ICONS={"Calendar": "~/.abra/recipes/authentik/icons/calendar.svg", "BBB": "~/.abra/recipes/authentik/icons/bbb.png", "Pretix": "~/.abra/recipes/authentik/icons/pretix.svg"} diff --git a/compose.hedgedoc.yml b/compose.hedgedoc.yml index e57c94e..9bc988f 100644 --- a/compose.hedgedoc.yml +++ b/compose.hedgedoc.yml @@ -6,6 +6,8 @@ services: - hedgedoc_secret environment: - HEDGEDOC_DOMAIN + - HEDGEDOC_APPGROUP + configs: - source: hedgedoc target: /blueprints/hedgedoc.yaml @@ -18,7 +20,6 @@ secrets: external: true name: ${STACK_NAME}_hedgedoc_secret_${SECRET_HEDGEDOC_SECRET_VERSION} - configs: hedgedoc: name: ${STACK_NAME}_hedgedoc_${HEDGEDOC_CONFIG_VERSION} diff --git a/compose.kimai.yml b/compose.kimai.yml index 83db73d..4874a16 100644 --- a/compose.kimai.yml +++ b/compose.kimai.yml @@ -3,6 +3,7 @@ services: worker: environment: - KIMAI_DOMAIN + - KIMAI_APPGROUP configs: - source: kimai target: /blueprints/kimai.yaml diff --git a/compose.matrix.yml b/compose.matrix.yml index dd2075f..1073ed0 100644 --- a/compose.matrix.yml +++ b/compose.matrix.yml @@ -13,6 +13,7 @@ services: environment: - ELEMENT_DOMAIN - MATRIX_DOMAIN + - MATRIX_APPGROUP configs: - source: matrix target: /blueprints/matrix.yaml @@ -25,7 +26,6 @@ secrets: external: true name: ${STACK_NAME}_matrix_secret_${SECRET_MATRIX_SECRET_VERSION} - configs: matrix: name: ${STACK_NAME}_matrix_${MATRIX_CONFIG_VERSION} diff --git a/compose.monitoring.yml b/compose.monitoring.yml index c7d0220..fb4e52f 100644 --- a/compose.monitoring.yml +++ b/compose.monitoring.yml @@ -5,7 +5,8 @@ services: - monitoring_id - monitoring_secret environment: - - MONITORING_DOMAIN + - MONITORING_DOMAIN + - MONITORING_APPGROUP configs: - source: monitoring target: /blueprints/monitoring.yaml @@ -18,7 +19,6 @@ secrets: external: true name: ${STACK_NAME}_monitoring_secret_${SECRET_MONITORING_SECRET_VERSION} - configs: monitoring: name: ${STACK_NAME}_monitoring_${MONITORING_CONFIG_VERSION} diff --git a/compose.nextcloud.yml b/compose.nextcloud.yml index 965b6c0..5c535ad 100644 --- a/compose.nextcloud.yml +++ b/compose.nextcloud.yml @@ -6,6 +6,7 @@ services: - nextcloud_secret environment: - NEXTCLOUD_DOMAIN + - NEXTCLOUD_APPGROUP configs: - source: nextcloud target: /blueprints/nextcloud.yaml @@ -18,7 +19,6 @@ secrets: external: true name: ${STACK_NAME}_nextcloud_secret_${SECRET_NEXTCLOUD_SECRET_VERSION} - configs: nextcloud: name: ${STACK_NAME}_nextcloud_${NEXTCLOUD_CONFIG_VERSION} diff --git a/compose.outline.yml b/compose.outline.yml index 27eb6aa..48fdd21 100644 --- a/compose.outline.yml +++ b/compose.outline.yml @@ -6,6 +6,7 @@ services: - outline_secret environment: - OUTLINE_DOMAIN + - OUTLINE_APPGROUP configs: - source: outline target: /blueprints/outline.yaml @@ -18,7 +19,6 @@ secrets: external: true name: ${STACK_NAME}_outline_secret_${SECRET_OUTLINE_SECRET_VERSION} - configs: outline: name: ${STACK_NAME}_outline_${OUTLINE_CONFIG_VERSION} diff --git a/compose.rallly.yml b/compose.rallly.yml index 56ff556..45d42dd 100644 --- a/compose.rallly.yml +++ b/compose.rallly.yml @@ -6,6 +6,7 @@ services: - rallly_secret environment: - RALLLY_DOMAIN + - RALLLY_APPGROUP configs: - source: rallly target: /blueprints/rallly.yaml @@ -18,7 +19,6 @@ secrets: external: true name: ${STACK_NAME}_rallly_secret_${SECRET_RALLLY_SECRET_VERSION} - configs: rallly: name: ${STACK_NAME}_rallly_${RALLLY_CONFIG_VERSION} diff --git a/compose.vikunja.yml b/compose.vikunja.yml index 63ee7ea..e0701f1 100644 --- a/compose.vikunja.yml +++ b/compose.vikunja.yml @@ -6,6 +6,7 @@ services: - vikunja_secret environment: - VIKUNJA_DOMAIN + - VIKUNJA_APPGROUP configs: - source: vikunja target: /blueprints/vikunja.yaml @@ -18,7 +19,6 @@ secrets: external: true name: ${STACK_NAME}_vikunja_secret_${SECRET_VIKUNJA_SECRET_VERSION} - configs: vikunja: name: ${STACK_NAME}_vikunja_${VIKUNJA_CONFIG_VERSION} diff --git a/compose.wekan.yml b/compose.wekan.yml index 49b506e..5fb6681 100644 --- a/compose.wekan.yml +++ b/compose.wekan.yml @@ -6,6 +6,7 @@ services: - wekan_secret environment: - WEKAN_DOMAIN + - WEKAN_APPGROUP configs: - source: wekan target: /blueprints/wekan.yaml @@ -18,7 +19,6 @@ secrets: external: true name: ${STACK_NAME}_wekan_secret_${SECRET_WEKAN_SECRET_VERSION} - configs: wekan: name: ${STACK_NAME}_wekan_${WEKAN_CONFIG_VERSION} diff --git a/compose.wordpress.yml b/compose.wordpress.yml index 564e86d..fd6f8a5 100644 --- a/compose.wordpress.yml +++ b/compose.wordpress.yml @@ -7,6 +7,7 @@ services: environment: - WORDPRESS_DOMAIN - WORDPRESS_GROUP + - WORDPRESS_APPGROUP configs: - source: wordpress target: /blueprints/wordpress.yaml @@ -19,7 +20,6 @@ secrets: external: true name: ${STACK_NAME}_wordpress_secret_${SECRET_WORDPRESS_SECRET_VERSION} - configs: wordpress: name: ${STACK_NAME}_wordpress_${WORDPRESS_CONFIG_VERSION} diff --git a/compose.zammad.yml b/compose.zammad.yml index 8274953..3480917 100644 --- a/compose.zammad.yml +++ b/compose.zammad.yml @@ -3,6 +3,7 @@ services: worker: environment: - ZAMMAD_DOMAIN + - ZAMMAD_APPGROUP configs: - source: zammad target: /blueprints/zammad.yaml diff --git a/hedgedoc.yaml.tmpl b/hedgedoc.yaml.tmpl index 10b6007..7429103 100644 --- a/hedgedoc.yaml.tmpl +++ b/hedgedoc.yaml.tmpl @@ -40,6 +40,7 @@ entries: policy_engine_mode: any provider: !KeyOf hedgedoc_provider slug: hedgedoc + group: {{ env "HEDGEDOC_APPGROUP" }} conditions: [] id: hedgedoc_application identifiers: diff --git a/kimai.yaml.tmpl b/kimai.yaml.tmpl index 844e852..2542884 100644 --- a/kimai.yaml.tmpl +++ b/kimai.yaml.tmpl @@ -42,6 +42,7 @@ entries: policy_engine_mode: any provider: !KeyOf kimai_provider slug: kimai + group: {{ env "KIMAI_APPGROUP" }} conditions: [] id: kimai_application identifiers: diff --git a/matrix.yaml.tmpl b/matrix.yaml.tmpl index d5195d6..a21650e 100644 --- a/matrix.yaml.tmpl +++ b/matrix.yaml.tmpl @@ -40,6 +40,7 @@ entries: policy_engine_mode: any provider: !KeyOf matrix_provider name: Element + group: {{ env "MATRIX_APPGROUP" }} conditions: [] id: matrix_application identifiers: diff --git a/monitoring.yaml.tmpl b/monitoring.yaml.tmpl index 3c88d6a..2f959ae 100644 --- a/monitoring.yaml.tmpl +++ b/monitoring.yaml.tmpl @@ -39,7 +39,8 @@ entries: open_in_new_tab: true policy_engine_mode: any provider: !KeyOf monitoring_provider - slug: monitoring + slug: monitoring + group: {{ env "MONITORING_APPGROUP" }} conditions: [] id: monitoring_application identifiers: diff --git a/nextcloud.yaml.tmpl b/nextcloud.yaml.tmpl index 33bdb68..0a1d878 100644 --- a/nextcloud.yaml.tmpl +++ b/nextcloud.yaml.tmpl @@ -53,6 +53,7 @@ entries: policy_engine_mode: any provider: !KeyOf nextcloud_provider slug: nextcloud + group: {{ env "NEXTCLOUD_APPGROUP" }} conditions: [] id: nextcloud_application identifiers: diff --git a/outline.yaml.tmpl b/outline.yaml.tmpl index a388a16..d698672 100644 --- a/outline.yaml.tmpl +++ b/outline.yaml.tmpl @@ -40,6 +40,7 @@ entries: policy_engine_mode: any provider: !KeyOf outline_provider slug: outline + group: {{ env "OUTLINE_APPGROUP" }} conditions: [] id: outline_application identifiers: diff --git a/rallly.yaml.tmpl b/rallly.yaml.tmpl index a1a649a..c143e67 100644 --- a/rallly.yaml.tmpl +++ b/rallly.yaml.tmpl @@ -40,6 +40,7 @@ entries: policy_engine_mode: any provider: !KeyOf rallly_provider slug: rallly + group: {{ env "RALLLY_APPGROUP" }} conditions: [] id: rallly_application identifiers: diff --git a/vikunja.yaml.tmpl b/vikunja.yaml.tmpl index 5267035..a98b197 100644 --- a/vikunja.yaml.tmpl +++ b/vikunja.yaml.tmpl @@ -40,6 +40,7 @@ entries: policy_engine_mode: any provider: !KeyOf vikunja_provider slug: vikunja + group: {{ env "VIKUNJA_APPGROUP" }} conditions: [] id: vikunja_application identifiers: diff --git a/wekan.yaml.tmpl b/wekan.yaml.tmpl index a2c70de..e8e2922 100644 --- a/wekan.yaml.tmpl +++ b/wekan.yaml.tmpl @@ -58,6 +58,7 @@ entries: policy_engine_mode: any provider: !KeyOf wekan_provider slug: wekan + group: {{ env "WEKAN_APPGROUP" }} conditions: [] id: wekan_application identifiers: diff --git a/wordpress.yaml.tmpl b/wordpress.yaml.tmpl index 91c8c2c..fa83e8c 100644 --- a/wordpress.yaml.tmpl +++ b/wordpress.yaml.tmpl @@ -40,6 +40,7 @@ entries: policy_engine_mode: any provider: !KeyOf wordpress_provider slug: wordpress + group: {{ env "WORDPRESS_APPGROUP" }} conditions: [] id: wordpress_application identifiers: diff --git a/zammad.yaml.tmpl b/zammad.yaml.tmpl index b84a6d9..2c0c164 100644 --- a/zammad.yaml.tmpl +++ b/zammad.yaml.tmpl @@ -61,6 +61,7 @@ entries: policy_engine_mode: any provider: !KeyOf zammad_provider slug: zammad + group: {{ env "ZAMMAD_APPGROUP" }} conditions: [] id: zammad_application identifiers: -- 2.47.2