From 7112d0f898a8d29e6406ee7c6c1a66514ded8392 Mon Sep 17 00:00:00 2001 From: Will Vedder Date: Tue, 7 Feb 2023 16:35:41 -0500 Subject: [PATCH 1/8] Adding keyword replacement test for yaml and recordings --- test/e2e/e2e.test.ts | 58 +++ ...yaml-config-with-keyword-replacements.json | 368 ++++++++++++++++++ .../keyword-replacements/yaml/_reset.yaml | 6 + .../keyword-replacements/yaml/tenant.yaml | 5 + 4 files changed, 437 insertions(+) create mode 100644 test/e2e/recordings/should-deploy-yaml-config-with-keyword-replacements.json create mode 100644 test/e2e/testdata/keyword-replacements/yaml/_reset.yaml create mode 100644 test/e2e/testdata/keyword-replacements/yaml/tenant.yaml diff --git a/test/e2e/e2e.test.ts b/test/e2e/e2e.test.ts index 6739acef7..7bcdf0608 100644 --- a/test/e2e/e2e.test.ts +++ b/test/e2e/e2e.test.ts @@ -245,3 +245,61 @@ describe('#end-to-end dump and deploy cycle', function () { recordingDone(); }); }); + +describe('#end-to-end keyword replacement', function () { + it('should deploy yaml config with keyword replacements', async function () { + const { recordingDone } = await setupRecording(this.test?.title); + + //Resetting tenant to baseline state + await deploy({ + input_file: `${__dirname}/testdata/keyword-replacements/yaml/_reset.yaml`, + config: { + AUTH0_DOMAIN, + AUTH0_CLIENT_ID, + AUTH0_CLIENT_SECRET, + AUTH0_ACCESS_TOKEN, + AUTH0_INCLUDED_ONLY: ['tenant'], + }, + }); + + const keywordMapping = { + COMPANY_NAME: 'Travel0', + LANGUAGES: ['en', 'es'], + }; + + await deploy({ + input_file: `${__dirname}/testdata/keyword-replacements/yaml/tenant.yaml`, + config: { + AUTH0_DOMAIN, + AUTH0_CLIENT_ID, + AUTH0_CLIENT_SECRET, + AUTH0_ACCESS_TOKEN, + AUTH0_INCLUDED_ONLY: ['tenant'], + AUTH0_KEYWORD_REPLACE_MAPPINGS: keywordMapping, + }, + }); + + const workDirectory = testNameToWorkingDirectory(this.test?.title); + await dump({ + output_folder: workDirectory, + format: 'yaml', + config: { + AUTH0_DOMAIN, + AUTH0_CLIENT_ID, + AUTH0_CLIENT_SECRET, + AUTH0_ACCESS_TOKEN, + AUTH0_INCLUDED_ONLY: ['tenant'], + }, + }); + + const files = getFiles(workDirectory, ['.yaml']); + expect(files).to.have.length(1); + expect(files[0]).to.equal(path.join(workDirectory, 'tenant.yaml')); + + const yaml = yamlLoad(fs.readFileSync(files[0])); + expect(yaml.tenant.friendly_name).to.equal(`This is the ${keywordMapping.COMPANY_NAME} Tenant`); + expect(yaml.tenant.enabled_locales).to.deep.equal(keywordMapping.LANGUAGES); + + recordingDone(); + }); +}); diff --git a/test/e2e/recordings/should-deploy-yaml-config-with-keyword-replacements.json b/test/e2e/recordings/should-deploy-yaml-config-with-keyword-replacements.json new file mode 100644 index 000000000..bf34e6adc --- /dev/null +++ b/test/e2e/recordings/should-deploy-yaml-config-with-keyword-replacements.json @@ -0,0 +1,368 @@ +[ + { + "scope": "https://deploy-cli-dev.eu.auth0.com:443", + "method": "GET", + "path": "/api/v2/tenants/settings", + "body": "", + "status": 200, + "response": { + "allowed_logout_urls": [ + "https://mycompany.org/logoutCallback" + ], + "change_password": { + "enabled": true, + "html": "Change Password\n" + }, + "enabled_locales": [ + "en", + "es" + ], + "error_page": { + "html": "Error Page\n", + "show_log_link": false, + "url": "https://mycompany.org/error" + }, + "flags": { + "allow_changing_enable_sso": false, + "allow_legacy_delegation_grant_types": true, + "allow_legacy_ro_grant_types": true, + "change_pwd_flow_v1": false, + "disable_impersonation": true, + "enable_apis_section": false, + "enable_client_connections": false, + "enable_custom_domain_in_emails": false, + "enable_dynamic_client_registration": false, + "enable_legacy_logs_search_v2": false, + "enable_public_signup_user_exists_error": true, + "enable_sso": true, + "new_universal_login_experience_enabled": true, + "universal_login": true, + "use_scope_descriptions_for_consent": false, + "revoke_refresh_token_grant": false, + "disable_clickjack_protection_headers": false, + "enable_pipeline2": false + }, + "friendly_name": "This is the Travel0 Tenant", + "guardian_mfa_page": { + "enabled": true, + "html": "MFA\n" + }, + "idle_session_lifetime": 1, + "picture_url": "https://upload.wikimedia.org/wikipedia/commons/0/0d/Grandmas_marathon_finishers.png", + "sandbox_version": "12", + "session_lifetime": 3.0166666666666666, + "support_email": "support@mycompany.org", + "support_url": "https://mycompany.org/support", + "universal_login": { + "colors": { + "primary": "#F8F8F2", + "page_background": "#222221" + } + }, + "session_cookie": { + "mode": "non-persistent" + }, + "sandbox_versions_available": [ + "16", + "12" + ] + }, + "rawHeaders": [], + "responseIsBinary": false + }, + { + "scope": "https://deploy-cli-dev.eu.auth0.com:443", + "method": "PATCH", + "path": "/api/v2/tenants/settings", + "body": { + "friendly_name": "Tenant friendly name", + "enabled_locales": [ + "en" + ], + "flags": { + "new_universal_login_experience_enabled": true + } + }, + "status": 200, + "response": { + "allowed_logout_urls": [ + "https://mycompany.org/logoutCallback" + ], + "change_password": { + "enabled": true, + "html": "Change Password\n" + }, + "enabled_locales": [ + "en" + ], + "error_page": { + "html": "Error Page\n", + "show_log_link": false, + "url": "https://mycompany.org/error" + }, + "flags": { + "allow_changing_enable_sso": false, + "allow_legacy_delegation_grant_types": true, + "allow_legacy_ro_grant_types": true, + "cannot_change_enforce_client_authentication_on_passwordless_start": true, + "change_pwd_flow_v1": false, + "disable_impersonation": true, + "enable_apis_section": false, + "enable_client_connections": false, + "enable_custom_domain_in_emails": false, + "enable_dynamic_client_registration": false, + "enable_legacy_logs_search_v2": false, + "enable_public_signup_user_exists_error": true, + "enable_sso": true, + "enforce_client_authentication_on_passwordless_start": true, + "new_universal_login_experience_enabled": true, + "universal_login": true, + "use_scope_descriptions_for_consent": false, + "revoke_refresh_token_grant": false, + "disable_clickjack_protection_headers": false, + "enable_pipeline2": false + }, + "friendly_name": "Tenant friendly name", + "guardian_mfa_page": { + "enabled": true, + "html": "MFA\n" + }, + "idle_session_lifetime": 1, + "picture_url": "https://upload.wikimedia.org/wikipedia/commons/0/0d/Grandmas_marathon_finishers.png", + "sandbox_version": "12", + "session_lifetime": 3.0166666666666666, + "support_email": "support@mycompany.org", + "support_url": "https://mycompany.org/support", + "universal_login": { + "colors": { + "primary": "#F8F8F2", + "page_background": "#222221" + } + }, + "session_cookie": { + "mode": "non-persistent" + } + }, + "rawHeaders": [], + "responseIsBinary": false + }, + { + "scope": "https://deploy-cli-dev.eu.auth0.com:443", + "method": "GET", + "path": "/api/v2/tenants/settings", + "body": "", + "status": 200, + "response": { + "allowed_logout_urls": [ + "https://mycompany.org/logoutCallback" + ], + "change_password": { + "enabled": true, + "html": "Change Password\n" + }, + "enabled_locales": [ + "en" + ], + "error_page": { + "html": "Error Page\n", + "show_log_link": false, + "url": "https://mycompany.org/error" + }, + "flags": { + "allow_changing_enable_sso": false, + "allow_legacy_delegation_grant_types": true, + "allow_legacy_ro_grant_types": true, + "change_pwd_flow_v1": false, + "disable_impersonation": true, + "enable_apis_section": false, + "enable_client_connections": false, + "enable_custom_domain_in_emails": false, + "enable_dynamic_client_registration": false, + "enable_legacy_logs_search_v2": false, + "enable_public_signup_user_exists_error": true, + "enable_sso": true, + "new_universal_login_experience_enabled": true, + "universal_login": true, + "use_scope_descriptions_for_consent": false, + "revoke_refresh_token_grant": false, + "disable_clickjack_protection_headers": false, + "enable_pipeline2": false + }, + "friendly_name": "Tenant friendly name", + "guardian_mfa_page": { + "enabled": true, + "html": "MFA\n" + }, + "idle_session_lifetime": 1, + "picture_url": "https://upload.wikimedia.org/wikipedia/commons/0/0d/Grandmas_marathon_finishers.png", + "sandbox_version": "12", + "session_lifetime": 3.0166666666666666, + "support_email": "support@mycompany.org", + "support_url": "https://mycompany.org/support", + "universal_login": { + "colors": { + "primary": "#F8F8F2", + "page_background": "#222221" + } + }, + "session_cookie": { + "mode": "non-persistent" + }, + "sandbox_versions_available": [ + "16", + "12" + ] + }, + "rawHeaders": [], + "responseIsBinary": false + }, + { + "scope": "https://deploy-cli-dev.eu.auth0.com:443", + "method": "PATCH", + "path": "/api/v2/tenants/settings", + "body": { + "friendly_name": "This is the Travel0 Tenant", + "enabled_locales": [ + "en", + "es" + ], + "flags": { + "new_universal_login_experience_enabled": true + } + }, + "status": 200, + "response": { + "allowed_logout_urls": [ + "https://mycompany.org/logoutCallback" + ], + "change_password": { + "enabled": true, + "html": "Change Password\n" + }, + "enabled_locales": [ + "en", + "es" + ], + "error_page": { + "html": "Error Page\n", + "show_log_link": false, + "url": "https://mycompany.org/error" + }, + "flags": { + "allow_changing_enable_sso": false, + "allow_legacy_delegation_grant_types": true, + "allow_legacy_ro_grant_types": true, + "cannot_change_enforce_client_authentication_on_passwordless_start": true, + "change_pwd_flow_v1": false, + "disable_impersonation": true, + "enable_apis_section": false, + "enable_client_connections": false, + "enable_custom_domain_in_emails": false, + "enable_dynamic_client_registration": false, + "enable_legacy_logs_search_v2": false, + "enable_public_signup_user_exists_error": true, + "enable_sso": true, + "enforce_client_authentication_on_passwordless_start": true, + "new_universal_login_experience_enabled": true, + "universal_login": true, + "use_scope_descriptions_for_consent": false, + "revoke_refresh_token_grant": false, + "disable_clickjack_protection_headers": false, + "enable_pipeline2": false + }, + "friendly_name": "This is the Travel0 Tenant", + "guardian_mfa_page": { + "enabled": true, + "html": "MFA\n" + }, + "idle_session_lifetime": 1, + "picture_url": "https://upload.wikimedia.org/wikipedia/commons/0/0d/Grandmas_marathon_finishers.png", + "sandbox_version": "12", + "session_lifetime": 3.0166666666666666, + "support_email": "support@mycompany.org", + "support_url": "https://mycompany.org/support", + "universal_login": { + "colors": { + "primary": "#F8F8F2", + "page_background": "#222221" + } + }, + "session_cookie": { + "mode": "non-persistent" + } + }, + "rawHeaders": [], + "responseIsBinary": false + }, + { + "scope": "https://deploy-cli-dev.eu.auth0.com:443", + "method": "GET", + "path": "/api/v2/tenants/settings", + "body": "", + "status": 200, + "response": { + "allowed_logout_urls": [ + "https://mycompany.org/logoutCallback" + ], + "change_password": { + "enabled": true, + "html": "Change Password\n" + }, + "enabled_locales": [ + "en", + "es" + ], + "error_page": { + "html": "Error Page\n", + "show_log_link": false, + "url": "https://mycompany.org/error" + }, + "flags": { + "allow_changing_enable_sso": false, + "allow_legacy_delegation_grant_types": true, + "allow_legacy_ro_grant_types": true, + "change_pwd_flow_v1": false, + "disable_impersonation": true, + "enable_apis_section": false, + "enable_client_connections": false, + "enable_custom_domain_in_emails": false, + "enable_dynamic_client_registration": false, + "enable_legacy_logs_search_v2": false, + "enable_public_signup_user_exists_error": true, + "enable_sso": true, + "new_universal_login_experience_enabled": true, + "universal_login": true, + "use_scope_descriptions_for_consent": false, + "revoke_refresh_token_grant": false, + "disable_clickjack_protection_headers": false, + "enable_pipeline2": false + }, + "friendly_name": "This is the Travel0 Tenant", + "guardian_mfa_page": { + "enabled": true, + "html": "MFA\n" + }, + "idle_session_lifetime": 1, + "picture_url": "https://upload.wikimedia.org/wikipedia/commons/0/0d/Grandmas_marathon_finishers.png", + "sandbox_version": "12", + "session_lifetime": 3.0166666666666666, + "support_email": "support@mycompany.org", + "support_url": "https://mycompany.org/support", + "universal_login": { + "colors": { + "primary": "#F8F8F2", + "page_background": "#222221" + } + }, + "session_cookie": { + "mode": "non-persistent" + }, + "sandbox_versions_available": [ + "16", + "12" + ] + }, + "rawHeaders": [], + "responseIsBinary": false + } +] \ No newline at end of file diff --git a/test/e2e/testdata/keyword-replacements/yaml/_reset.yaml b/test/e2e/testdata/keyword-replacements/yaml/_reset.yaml new file mode 100644 index 000000000..7aa607258 --- /dev/null +++ b/test/e2e/testdata/keyword-replacements/yaml/_reset.yaml @@ -0,0 +1,6 @@ +#This configuration is to reset the tenant to a baseline state +tenant: + friendly_name: Tenant friendly name + enabled_locales: ['en'] + flags: + new_universal_login_experience_enabled: true \ No newline at end of file diff --git a/test/e2e/testdata/keyword-replacements/yaml/tenant.yaml b/test/e2e/testdata/keyword-replacements/yaml/tenant.yaml new file mode 100644 index 000000000..fb3bae9df --- /dev/null +++ b/test/e2e/testdata/keyword-replacements/yaml/tenant.yaml @@ -0,0 +1,5 @@ +tenant: + friendly_name: This is the ##COMPANY_NAME## Tenant + enabled_locales: @@LANGUAGES@@ + flags: + new_universal_login_experience_enabled: true \ No newline at end of file From 1afec8227f4e05a9451ef9b0a8417249f0267094 Mon Sep 17 00:00:00 2001 From: Will Vedder Date: Tue, 7 Feb 2023 17:05:50 -0500 Subject: [PATCH 2/8] Adding keyword replacement test for directory and recordings --- test/e2e/e2e.test.ts | 55 +++ ...SON)-config-with-keyword-replacements.json | 341 ++++++++++++++++++ .../directory/_reset.json | 9 + .../directory/tenant.json | 9 + 4 files changed, 414 insertions(+) create mode 100644 test/e2e/recordings/should-deploy-directory-(JSON)-config-with-keyword-replacements.json create mode 100644 test/e2e/testdata/keyword-replacements/directory/_reset.json create mode 100644 test/e2e/testdata/keyword-replacements/directory/tenant.json diff --git a/test/e2e/e2e.test.ts b/test/e2e/e2e.test.ts index 7bcdf0608..88e282505 100644 --- a/test/e2e/e2e.test.ts +++ b/test/e2e/e2e.test.ts @@ -302,4 +302,59 @@ describe('#end-to-end keyword replacement', function () { recordingDone(); }); + + it('should deploy directory (JSON) config with keyword replacements', async function () { + const { recordingDone } = await setupRecording(this.test?.title); + + //Resetting tenant to baseline state + await deploy({ + input_file: `${__dirname}/testdata/keyword-replacements/directory`, + config: { + AUTH0_DOMAIN, + AUTH0_CLIENT_ID, + AUTH0_CLIENT_SECRET, + AUTH0_ACCESS_TOKEN, + AUTH0_INCLUDED_ONLY: ['tenant'], + }, + }); + + const keywordMapping = { + COMPANY_NAME: 'Travel0', + //LANGUAGES: ['en', 'es'], //TODO: support array replacement for directory format + }; + + await deploy({ + input_file: `${__dirname}/testdata/keyword-replacements/directory`, + config: { + AUTH0_DOMAIN, + AUTH0_CLIENT_ID, + AUTH0_CLIENT_SECRET, + AUTH0_ACCESS_TOKEN, + AUTH0_INCLUDED_ONLY: ['tenant'], + AUTH0_KEYWORD_REPLACE_MAPPINGS: keywordMapping, + }, + }); + + const workDirectory = testNameToWorkingDirectory(this.test?.title); + await dump({ + output_folder: workDirectory, + format: 'directory', + config: { + AUTH0_DOMAIN, + AUTH0_CLIENT_ID, + AUTH0_CLIENT_SECRET, + AUTH0_ACCESS_TOKEN, + AUTH0_INCLUDED_ONLY: ['tenant'], + }, + }); + + const files = getFiles(workDirectory, ['.json']); + expect(files).to.have.length(1); + expect(files[0]).to.equal(path.join(workDirectory, 'tenant.json')); + + const json = JSON.parse(fs.readFileSync(files[0]).toString()); + expect(json.friendly_name).to.equal(`This is the ${keywordMapping.COMPANY_NAME} Tenant`); + + recordingDone(); + }); }); diff --git a/test/e2e/recordings/should-deploy-directory-(JSON)-config-with-keyword-replacements.json b/test/e2e/recordings/should-deploy-directory-(JSON)-config-with-keyword-replacements.json new file mode 100644 index 000000000..186e03661 --- /dev/null +++ b/test/e2e/recordings/should-deploy-directory-(JSON)-config-with-keyword-replacements.json @@ -0,0 +1,341 @@ +[ + { + "scope": "https://deploy-cli-dev.eu.auth0.com:443", + "method": "GET", + "path": "/api/v2/tenants/settings", + "body": "", + "status": 200, + "response": { + "allowed_logout_urls": [ + "https://mycompany.org/logoutCallback" + ], + "change_password": { + "enabled": true, + "html": "Change Password\n" + }, + "enabled_locales": [ + "en" + ], + "error_page": { + "html": "Error Page\n", + "show_log_link": false, + "url": "https://mycompany.org/error" + }, + "flags": { + "allow_changing_enable_sso": false, + "allow_legacy_delegation_grant_types": true, + "allow_legacy_ro_grant_types": true, + "change_pwd_flow_v1": false, + "disable_impersonation": true, + "enable_apis_section": false, + "enable_client_connections": false, + "enable_custom_domain_in_emails": false, + "enable_dynamic_client_registration": false, + "enable_legacy_logs_search_v2": false, + "enable_public_signup_user_exists_error": true, + "enable_sso": true, + "new_universal_login_experience_enabled": true, + "universal_login": true, + "use_scope_descriptions_for_consent": false, + "revoke_refresh_token_grant": false, + "disable_clickjack_protection_headers": false, + "enable_pipeline2": false + }, + "friendly_name": "This is the Travel0 Tenant", + "guardian_mfa_page": { + "enabled": true, + "html": "MFA\n" + }, + "idle_session_lifetime": 1, + "picture_url": "https://upload.wikimedia.org/wikipedia/commons/0/0d/Grandmas_marathon_finishers.png", + "sandbox_version": "12", + "session_lifetime": 3.0166666666666666, + "support_email": "support@mycompany.org", + "support_url": "https://mycompany.org/support", + "universal_login": {}, + "session_cookie": { + "mode": "non-persistent" + }, + "sandbox_versions_available": [ + "16", + "12" + ] + }, + "rawHeaders": [], + "responseIsBinary": false + }, + { + "scope": "https://deploy-cli-dev.eu.auth0.com:443", + "method": "PATCH", + "path": "/api/v2/tenants/settings", + "body": { + "enabled_locales": [ + "en" + ], + "friendly_name": "This is the ##COMPANY_NAME## Tenant", + "flags": { + "new_universal_login_experience_enabled": true + }, + "universal_login": {} + }, + "status": 200, + "response": { + "allowed_logout_urls": [ + "https://mycompany.org/logoutCallback" + ], + "change_password": { + "enabled": true, + "html": "Change Password\n" + }, + "enabled_locales": [ + "en" + ], + "error_page": { + "html": "Error Page\n", + "show_log_link": false, + "url": "https://mycompany.org/error" + }, + "flags": { + "allow_changing_enable_sso": false, + "allow_legacy_delegation_grant_types": true, + "allow_legacy_ro_grant_types": true, + "cannot_change_enforce_client_authentication_on_passwordless_start": true, + "change_pwd_flow_v1": false, + "disable_impersonation": true, + "enable_apis_section": false, + "enable_client_connections": false, + "enable_custom_domain_in_emails": false, + "enable_dynamic_client_registration": false, + "enable_legacy_logs_search_v2": false, + "enable_public_signup_user_exists_error": true, + "enable_sso": true, + "enforce_client_authentication_on_passwordless_start": true, + "new_universal_login_experience_enabled": true, + "universal_login": true, + "use_scope_descriptions_for_consent": false, + "revoke_refresh_token_grant": false, + "disable_clickjack_protection_headers": false, + "enable_pipeline2": false + }, + "friendly_name": "This is the ##COMPANY_NAME## Tenant", + "guardian_mfa_page": { + "enabled": true, + "html": "MFA\n" + }, + "idle_session_lifetime": 1, + "picture_url": "https://upload.wikimedia.org/wikipedia/commons/0/0d/Grandmas_marathon_finishers.png", + "sandbox_version": "12", + "session_lifetime": 3.0166666666666666, + "support_email": "support@mycompany.org", + "support_url": "https://mycompany.org/support", + "universal_login": {}, + "session_cookie": { + "mode": "non-persistent" + } + }, + "rawHeaders": [], + "responseIsBinary": false + }, + { + "scope": "https://deploy-cli-dev.eu.auth0.com:443", + "method": "GET", + "path": "/api/v2/tenants/settings", + "body": "", + "status": 200, + "response": { + "allowed_logout_urls": [ + "https://mycompany.org/logoutCallback" + ], + "change_password": { + "enabled": true, + "html": "Change Password\n" + }, + "enabled_locales": [ + "en" + ], + "error_page": { + "html": "Error Page\n", + "show_log_link": false, + "url": "https://mycompany.org/error" + }, + "flags": { + "allow_changing_enable_sso": false, + "allow_legacy_delegation_grant_types": true, + "allow_legacy_ro_grant_types": true, + "change_pwd_flow_v1": false, + "disable_impersonation": true, + "enable_apis_section": false, + "enable_client_connections": false, + "enable_custom_domain_in_emails": false, + "enable_dynamic_client_registration": false, + "enable_legacy_logs_search_v2": false, + "enable_public_signup_user_exists_error": true, + "enable_sso": true, + "new_universal_login_experience_enabled": true, + "universal_login": true, + "use_scope_descriptions_for_consent": false, + "revoke_refresh_token_grant": false, + "disable_clickjack_protection_headers": false, + "enable_pipeline2": false + }, + "friendly_name": "This is the ##COMPANY_NAME## Tenant", + "guardian_mfa_page": { + "enabled": true, + "html": "MFA\n" + }, + "idle_session_lifetime": 1, + "picture_url": "https://upload.wikimedia.org/wikipedia/commons/0/0d/Grandmas_marathon_finishers.png", + "sandbox_version": "12", + "session_lifetime": 3.0166666666666666, + "support_email": "support@mycompany.org", + "support_url": "https://mycompany.org/support", + "universal_login": {}, + "session_cookie": { + "mode": "non-persistent" + }, + "sandbox_versions_available": [ + "16", + "12" + ] + }, + "rawHeaders": [], + "responseIsBinary": false + }, + { + "scope": "https://deploy-cli-dev.eu.auth0.com:443", + "method": "PATCH", + "path": "/api/v2/tenants/settings", + "body": { + "enabled_locales": [ + "en" + ], + "friendly_name": "This is the Travel0 Tenant", + "flags": { + "new_universal_login_experience_enabled": true + }, + "universal_login": {} + }, + "status": 200, + "response": { + "allowed_logout_urls": [ + "https://mycompany.org/logoutCallback" + ], + "change_password": { + "enabled": true, + "html": "Change Password\n" + }, + "enabled_locales": [ + "en" + ], + "error_page": { + "html": "Error Page\n", + "show_log_link": false, + "url": "https://mycompany.org/error" + }, + "flags": { + "allow_changing_enable_sso": false, + "allow_legacy_delegation_grant_types": true, + "allow_legacy_ro_grant_types": true, + "cannot_change_enforce_client_authentication_on_passwordless_start": true, + "change_pwd_flow_v1": false, + "disable_impersonation": true, + "enable_apis_section": false, + "enable_client_connections": false, + "enable_custom_domain_in_emails": false, + "enable_dynamic_client_registration": false, + "enable_legacy_logs_search_v2": false, + "enable_public_signup_user_exists_error": true, + "enable_sso": true, + "enforce_client_authentication_on_passwordless_start": true, + "new_universal_login_experience_enabled": true, + "universal_login": true, + "use_scope_descriptions_for_consent": false, + "revoke_refresh_token_grant": false, + "disable_clickjack_protection_headers": false, + "enable_pipeline2": false + }, + "friendly_name": "This is the Travel0 Tenant", + "guardian_mfa_page": { + "enabled": true, + "html": "MFA\n" + }, + "idle_session_lifetime": 1, + "picture_url": "https://upload.wikimedia.org/wikipedia/commons/0/0d/Grandmas_marathon_finishers.png", + "sandbox_version": "12", + "session_lifetime": 3.0166666666666666, + "support_email": "support@mycompany.org", + "support_url": "https://mycompany.org/support", + "universal_login": {}, + "session_cookie": { + "mode": "non-persistent" + } + }, + "rawHeaders": [], + "responseIsBinary": false + }, + { + "scope": "https://deploy-cli-dev.eu.auth0.com:443", + "method": "GET", + "path": "/api/v2/tenants/settings", + "body": "", + "status": 200, + "response": { + "allowed_logout_urls": [ + "https://mycompany.org/logoutCallback" + ], + "change_password": { + "enabled": true, + "html": "Change Password\n" + }, + "enabled_locales": [ + "en" + ], + "error_page": { + "html": "Error Page\n", + "show_log_link": false, + "url": "https://mycompany.org/error" + }, + "flags": { + "allow_changing_enable_sso": false, + "allow_legacy_delegation_grant_types": true, + "allow_legacy_ro_grant_types": true, + "change_pwd_flow_v1": false, + "disable_impersonation": true, + "enable_apis_section": false, + "enable_client_connections": false, + "enable_custom_domain_in_emails": false, + "enable_dynamic_client_registration": false, + "enable_legacy_logs_search_v2": false, + "enable_public_signup_user_exists_error": true, + "enable_sso": true, + "new_universal_login_experience_enabled": true, + "universal_login": true, + "use_scope_descriptions_for_consent": false, + "revoke_refresh_token_grant": false, + "disable_clickjack_protection_headers": false, + "enable_pipeline2": false + }, + "friendly_name": "This is the Travel0 Tenant", + "guardian_mfa_page": { + "enabled": true, + "html": "MFA\n" + }, + "idle_session_lifetime": 1, + "picture_url": "https://upload.wikimedia.org/wikipedia/commons/0/0d/Grandmas_marathon_finishers.png", + "sandbox_version": "12", + "session_lifetime": 3.0166666666666666, + "support_email": "support@mycompany.org", + "support_url": "https://mycompany.org/support", + "universal_login": {}, + "session_cookie": { + "mode": "non-persistent" + }, + "sandbox_versions_available": [ + "16", + "12" + ] + }, + "rawHeaders": [], + "responseIsBinary": false + } +] \ No newline at end of file diff --git a/test/e2e/testdata/keyword-replacements/directory/_reset.json b/test/e2e/testdata/keyword-replacements/directory/_reset.json new file mode 100644 index 000000000..01357a90b --- /dev/null +++ b/test/e2e/testdata/keyword-replacements/directory/_reset.json @@ -0,0 +1,9 @@ +{ + "enabled_locales": ["en"], + "friendly_name": "Tenant friendly name", + "flags": { + "new_universal_login_experience_enabled": true + }, + "universal_login": {} + } + \ No newline at end of file diff --git a/test/e2e/testdata/keyword-replacements/directory/tenant.json b/test/e2e/testdata/keyword-replacements/directory/tenant.json new file mode 100644 index 000000000..05a51f0d0 --- /dev/null +++ b/test/e2e/testdata/keyword-replacements/directory/tenant.json @@ -0,0 +1,9 @@ +{ + "enabled_locales": ["en"], + "friendly_name": "This is the ##COMPANY_NAME## Tenant", + "flags": { + "new_universal_login_experience_enabled": true + }, + "universal_login": {} + } + \ No newline at end of file From 19ce9a5559544288801d54d15b3c3051ce2c3e41 Mon Sep 17 00:00:00 2001 From: Will Vedder Date: Wed, 8 Feb 2023 16:18:37 -0500 Subject: [PATCH 3/8] Update test/e2e/testdata/keyword-replacements/yaml/tenant.yaml Co-authored-by: Sergiu Ghitea <28300158+sergiught@users.noreply.github.com> --- test/e2e/testdata/keyword-replacements/yaml/tenant.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/e2e/testdata/keyword-replacements/yaml/tenant.yaml b/test/e2e/testdata/keyword-replacements/yaml/tenant.yaml index fb3bae9df..1408628ae 100644 --- a/test/e2e/testdata/keyword-replacements/yaml/tenant.yaml +++ b/test/e2e/testdata/keyword-replacements/yaml/tenant.yaml @@ -2,4 +2,4 @@ tenant: friendly_name: This is the ##COMPANY_NAME## Tenant enabled_locales: @@LANGUAGES@@ flags: - new_universal_login_experience_enabled: true \ No newline at end of file + new_universal_login_experience_enabled: true From 1e7ab362b197966a8bb7e6d8d7214594241a11c9 Mon Sep 17 00:00:00 2001 From: Will Vedder Date: Wed, 8 Feb 2023 16:18:43 -0500 Subject: [PATCH 4/8] Update test/e2e/testdata/keyword-replacements/yaml/_reset.yaml Co-authored-by: Sergiu Ghitea <28300158+sergiught@users.noreply.github.com> --- test/e2e/testdata/keyword-replacements/yaml/_reset.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/e2e/testdata/keyword-replacements/yaml/_reset.yaml b/test/e2e/testdata/keyword-replacements/yaml/_reset.yaml index 7aa607258..e0401ce60 100644 --- a/test/e2e/testdata/keyword-replacements/yaml/_reset.yaml +++ b/test/e2e/testdata/keyword-replacements/yaml/_reset.yaml @@ -3,4 +3,4 @@ tenant: friendly_name: Tenant friendly name enabled_locales: ['en'] flags: - new_universal_login_experience_enabled: true \ No newline at end of file + new_universal_login_experience_enabled: true From df8c5254142c0ad09654af73fda34dbaa2aa342c Mon Sep 17 00:00:00 2001 From: Will Vedder Date: Wed, 8 Feb 2023 16:18:56 -0500 Subject: [PATCH 5/8] Update test/e2e/testdata/keyword-replacements/directory/tenant.json Co-authored-by: Sergiu Ghitea <28300158+sergiught@users.noreply.github.com> --- test/e2e/testdata/keyword-replacements/directory/tenant.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/e2e/testdata/keyword-replacements/directory/tenant.json b/test/e2e/testdata/keyword-replacements/directory/tenant.json index 05a51f0d0..ec5489910 100644 --- a/test/e2e/testdata/keyword-replacements/directory/tenant.json +++ b/test/e2e/testdata/keyword-replacements/directory/tenant.json @@ -5,5 +5,4 @@ "new_universal_login_experience_enabled": true }, "universal_login": {} - } - \ No newline at end of file + } \ No newline at end of file From 67ae8ce1a8509ac399b32207d90b4643cf1ccd9b Mon Sep 17 00:00:00 2001 From: Will Vedder Date: Wed, 8 Feb 2023 16:19:03 -0500 Subject: [PATCH 6/8] Update test/e2e/recordings/should-deploy-directory-(JSON)-config-with-keyword-replacements.json Co-authored-by: Sergiu Ghitea <28300158+sergiught@users.noreply.github.com> --- ...eploy-directory-(JSON)-config-with-keyword-replacements.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/e2e/recordings/should-deploy-directory-(JSON)-config-with-keyword-replacements.json b/test/e2e/recordings/should-deploy-directory-(JSON)-config-with-keyword-replacements.json index 186e03661..e7845c292 100644 --- a/test/e2e/recordings/should-deploy-directory-(JSON)-config-with-keyword-replacements.json +++ b/test/e2e/recordings/should-deploy-directory-(JSON)-config-with-keyword-replacements.json @@ -338,4 +338,4 @@ "rawHeaders": [], "responseIsBinary": false } -] \ No newline at end of file +] From f047415977ec91533d6de6679f39051fa0834e7a Mon Sep 17 00:00:00 2001 From: Will Vedder Date: Wed, 8 Feb 2023 16:19:10 -0500 Subject: [PATCH 7/8] Update test/e2e/recordings/should-deploy-yaml-config-with-keyword-replacements.json Co-authored-by: Sergiu Ghitea <28300158+sergiught@users.noreply.github.com> --- .../should-deploy-yaml-config-with-keyword-replacements.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/e2e/recordings/should-deploy-yaml-config-with-keyword-replacements.json b/test/e2e/recordings/should-deploy-yaml-config-with-keyword-replacements.json index bf34e6adc..5f27c9e6d 100644 --- a/test/e2e/recordings/should-deploy-yaml-config-with-keyword-replacements.json +++ b/test/e2e/recordings/should-deploy-yaml-config-with-keyword-replacements.json @@ -365,4 +365,4 @@ "rawHeaders": [], "responseIsBinary": false } -] \ No newline at end of file +] From d4e433815edd3e32a521aba6ce6d9f86492b06fa Mon Sep 17 00:00:00 2001 From: Will Vedder Date: Wed, 8 Feb 2023 16:19:17 -0500 Subject: [PATCH 8/8] Update test/e2e/testdata/keyword-replacements/directory/_reset.json Co-authored-by: Sergiu Ghitea <28300158+sergiught@users.noreply.github.com> --- test/e2e/testdata/keyword-replacements/directory/_reset.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/e2e/testdata/keyword-replacements/directory/_reset.json b/test/e2e/testdata/keyword-replacements/directory/_reset.json index 01357a90b..753eeb120 100644 --- a/test/e2e/testdata/keyword-replacements/directory/_reset.json +++ b/test/e2e/testdata/keyword-replacements/directory/_reset.json @@ -5,5 +5,4 @@ "new_universal_login_experience_enabled": true }, "universal_login": {} - } - \ No newline at end of file + } \ No newline at end of file