From ead70e36737aab28aa5e0f390a88d3dedf40f39b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 18 Aug 2023 11:33:19 +0200 Subject: [PATCH 1/5] Update manifest.toml --- manifest.toml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/manifest.toml b/manifest.toml index 0ad471e..fcadcf0 100644 --- a/manifest.toml +++ b/manifest.toml @@ -16,7 +16,7 @@ admindoc = "https://docs.2fauth.app/" code = "https://github.com/Bubka/2FAuth" [integration] -yunohost = ">= 11.1.21" +yunohost = ">= 11.2" architectures = "all" multi_instance = true ldap = false @@ -28,7 +28,6 @@ ram.runtime = "50M" [install] [install.domain] type = "domain" - full_domain = true [install.admin] type = "user" From 3f58d50500579f341bee78af5315e6a8c5052c78 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Wed, 23 Aug 2023 17:24:55 +0200 Subject: [PATCH 2/5] update .env --- conf/.env.example | 14 ++++++++------ scripts/upgrade | 13 ++++++++++++- 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/conf/.env.example b/conf/.env.example index d083f7a..ddaa8cd 100644 --- a/conf/.env.example +++ b/conf/.env.example @@ -111,8 +111,8 @@ AUTHENTICATION_GUARD=web-guard # Check your proxy documentation to find out how these headers are named (i.e 'REMOTE_USER', 'REMOTE_EMAIL', etc...) # (only relevant when AUTHENTICATION_GUARD is set to 'reverse-proxy-guard') -AUTH_PROXY_HEADER_FOR_USER= -AUTH_PROXY_HEADER_FOR_EMAIL= +AUTH_PROXY_HEADER_FOR_USER=null +AUTH_PROXY_HEADER_FOR_EMAIL=null # Custom logout URL to open when using an auth proxy. @@ -123,12 +123,14 @@ PROXY_LOGOUT_URL=null # Relying Party name, aka the name of the application. If null, defaults to APP_NAME -WEBAUTHN_NAME= +WEBAUTHN_NAME=2FAuth # Relying Party ID. If null, the device will fill it internally. # See https://webauthn-doc.spomky-labs.com/pre-requisites/the-relying-party#how-to-determine-the-relying-party-id -WEBAUTHN_ID= +WEBAUTHN_ID=null +# WEBAUTHN_ICON=null +# [/DEPRECATED] # Optional image data in BASE64 (128 bytes maximum) or an image url # See https://webauthn-doc.spomky-labs.com/pre-requisites/the-relying-party#relying-party-icon @@ -148,14 +150,14 @@ WEBAUTHN_ICON= # 'preferred' (default) : Will ask for user verification IF POSSIBLE # 'discouraged' : Will NOT ask for user verification (for example, to minimize disruption to the user interaction flow) -WEBAUTHN_USER_VERIFICATION= +WEBAUTHN_USER_VERIFICATION=preferred # Use this setting to declare trusted proxied. # Supported: # '*': to trust any proxy # A comma separated IP list: The list of proxies IP to trust -TRUSTED_PROXIES= +TRUSTED_PROXIES=null # Leave the following configuration vars as is. # Unless you like to tinker and know what you're doing. diff --git a/scripts/upgrade b/scripts/upgrade index f10fe6f..ff1003b 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -47,7 +47,7 @@ then ynh_script_progression --message="Upgrading source files..." --weight=3 # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$install_dir" --keep=".env storage" + ynh_setup_source --dest_dir="$install_dir" --keep="storage" fi chown -R $app:www-data "$install_dir" @@ -63,6 +63,17 @@ ynh_add_fpm_config --phpversion=$phpversion --usage=$fpm_usage --footprint=$fpm_ # Create a dedicated NGINX config ynh_add_nginx_config +#================================================= +# ADD A CONFIGURATION +#================================================= +ynh_script_progression --message="Adding a configuration file..." --weight=1 + +# Setup application config +ynh_add_config --template="../conf/.env.example" --destination="$install_dir/.env" + +chmod 644 "$install_dir/.env" +chown $app:$app "$install_dir/.env" + #================================================= # INSTALL 2FAUTH WITH COMPOSER #================================================= From ccf1dcc40756cbe533bf03750cc4dc198b02d184 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Wed, 23 Aug 2023 23:04:35 +0200 Subject: [PATCH 3/5] Update upgrade --- scripts/upgrade | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/upgrade b/scripts/upgrade index ff1003b..1936140 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -68,6 +68,8 @@ ynh_add_nginx_config #================================================= ynh_script_progression --message="Adding a configuration file..." --weight=1 +email=$(ynh_user_get_info --username=$admin --key=mail) + # Setup application config ynh_add_config --template="../conf/.env.example" --destination="$install_dir/.env" From 56e195a0ee72b0f58e6d3d6b30d4fa602c09b189 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 24 Aug 2023 07:37:22 +0200 Subject: [PATCH 4/5] Update manifest.toml --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index fcadcf0..e7ba6ee 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "2FAuth" description.en = "self-hosted alternative to One Time Passcode" description.fr = "Alternative auto-hébergée a One Time Passcode" -version = "4.1.0~ynh1" +version = "4.1.0~ynh2" maintainers = ["eric_G"] From 7e1c40605a32be40544ffba6eeb26ce9e6fc9171 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Thu, 24 Aug 2023 05:37:27 +0000 Subject: [PATCH 5/5] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f46ab13..6d9382b 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ It aims to ease you perform your 2FA authentication steps whatever the device yo - Edit accounts, even the imported ones - Generate TOTP and HOTP security codes -**Shipped version:** 4.1.0~ynh1 +**Shipped version:** 4.1.0~ynh2 **Demo:** https://demo.2fauth.app/login diff --git a/README_fr.md b/README_fr.md index 78f94b8..23f1b2d 100644 --- a/README_fr.md +++ b/README_fr.md @@ -28,7 +28,7 @@ It aims to ease you perform your 2FA authentication steps whatever the device yo - Edit accounts, even the imported ones - Generate TOTP and HOTP security codes -**Version incluse :** 4.1.0~ynh1 +**Version incluse :** 4.1.0~ynh2 **Démo :** https://demo.2fauth.app/login