From 859c75c0a79676f4388328ee54eade093336df51 Mon Sep 17 00:00:00 2001
From: mstasgravitee <152597515+mstasgravitee@users.noreply.github.com>
Date: Thu, 14 Dec 2023 12:30:56 +0100
Subject: [PATCH 1/2] AM-688: Do not refer to company.com (#3275)
(cherry picked from commit 12c6efa872549ef288a6b5294c270db93f246b85)
# Conflicts:
# gravitee-am-gateway/gravitee-am-gateway-standalone/gravitee-am-gateway-standalone-distribution/src/main/resources/config/gravitee.yml
# gravitee-am-test/specs/gateway/flow-execution.jest.spec.ts
# gravitee-am-ui/src/app/domain/applications/application/overview/overview.component.html
# gravitee-am-ui/src/app/domain/components/emails/email/email.component.html
# helm/tests/api-configmap_test.yaml
---
.../auth/webauthn/WebAuthnFactoryTest.java | 4 +-
.../src/main/resources/config/gravitee.yml | 25 +++-
.../main/resources/schemas/schema-form.json | 2 +-
.../api/preview/PreviewBuilder.java | 2 +-
.../api/resources/EntrypointResourceTest.java | 4 +-
.../resources/EntrypointsResourceTest.java | 2 +-
.../src/main/resources/config/gravitee.yml | 8 +-
.../SendEmailPolicyConfiguration.java | 2 +-
.../main/resources/schemas/schema-form.json | 2 +-
.../service/impl/EntrypointServiceImpl.java | 10 +-
.../am/service/EntrypointServiceTest.java | 12 +-
.../specs/gateway/flow-execution.jest.spec.ts | 42 +++++++
.../overview/overview.component.html | 14 +++
.../emails/email/email.component.html | 14 +++
helm/README.adoc | 4 +-
helm/README.md | 2 +-
helm/tests/api-configmap_test.yaml | 114 ++++++++++++++++--
helm/values.yaml | 2 +-
18 files changed, 225 insertions(+), 40 deletions(-)
diff --git a/gravitee-am-gateway/gravitee-am-gateway-handler/gravitee-am-gateway-handler-core/src/test/java/io/gravitee/am/gateway/handler/vertx/auth/webauthn/WebAuthnFactoryTest.java b/gravitee-am-gateway/gravitee-am-gateway-handler/gravitee-am-gateway-handler-core/src/test/java/io/gravitee/am/gateway/handler/vertx/auth/webauthn/WebAuthnFactoryTest.java
index 024fba92584..4999d9fb711 100644
--- a/gravitee-am-gateway/gravitee-am-gateway-handler/gravitee-am-gateway-handler-core/src/test/java/io/gravitee/am/gateway/handler/vertx/auth/webauthn/WebAuthnFactoryTest.java
+++ b/gravitee-am-gateway/gravitee-am-gateway-handler/gravitee-am-gateway-handler-core/src/test/java/io/gravitee/am/gateway/handler/vertx/auth/webauthn/WebAuthnFactoryTest.java
@@ -82,14 +82,14 @@ public void testCustom_emptySettings() {
public void testCustom_partialSettings() {
WebAuthnSettings webAuthnSettings = mock(WebAuthnSettings.class);
when(webAuthnSettings.getRelyingPartyName()).thenReturn("Custom RP name");
- when(webAuthnSettings.getOrigin()).thenReturn("https://auth.mycompany.com:8443");
+ when(webAuthnSettings.getOrigin()).thenReturn("https://auth.gravitee.io:8443");
when(domain.getWebAuthnSettings()).thenReturn(webAuthnSettings);
WebAuthn webAuthn = webAuthnFactory.getObject();
RelyingParty relyingParty = webAuthnFactory.getRelyingParty();
Assert.assertNotNull(webAuthn);
Assert.assertNotNull(relyingParty);
Assert.assertEquals("Custom RP name", relyingParty.getName());
- Assert.assertEquals("auth.mycompany.com", relyingParty.getId());
+ Assert.assertEquals("auth.gravitee.io", relyingParty.getId());
}
@Test
diff --git a/gravitee-am-gateway/gravitee-am-gateway-standalone/gravitee-am-gateway-standalone-distribution/src/main/resources/config/gravitee.yml b/gravitee-am-gateway/gravitee-am-gateway-standalone/gravitee-am-gateway-standalone-distribution/src/main/resources/config/gravitee.yml
index e36acecd9c8..8e5a3910890 100644
--- a/gravitee-am-gateway/gravitee-am-gateway-standalone/gravitee-am-gateway-standalone-distribution/src/main/resources/config/gravitee.yml
+++ b/gravitee-am-gateway/gravitee-am-gateway-standalone/gravitee-am-gateway-standalone-distribution/src/main/resources/config/gravitee.yml
@@ -47,7 +47,7 @@
# # The base_url contains the common url for each overrode endpoints.
# # The list of endpoint that support the mtls_aliases is : token_endpoint, authorization_endpoint, registration_endpoint, userinfo_endpoint, pushed_authorization_request_endpoint, end_session_endpoint, revocation_endpoint, introspection_endpoint
# mtls_aliases: # base URL for mtls_endpoint_aliases (default is null and the standard endpoints will be used)
-# base_url: https://mycompany.mlts.com
+# base_url: https://gravitee.mlts.com
# endpoints:
# - token_endpoint
# - registration_endpoint
@@ -77,7 +77,7 @@
# cors:
# Allows to configure the header Access-Control-Allow-Origin (default value: *)
# '*' is a valid value but is considered as a security risk as it will be opened to cross origin requests from anywhere.
-# allow-origin: http://developer.mycompany.com
+# allow-origin: http://developer.gravitee.io
# Allows to define how long the result of the preflight request should be cached for (default value; 1728000 [20 days])
# max-age: 864000
# Which methods to allow (default value: OPTIONS, GET, POST, PUT, DELETE, PATCH)
@@ -100,6 +100,11 @@
# - "style-src 'self' 'unsafe-inline';"
# - "frame-ancestors 'none';"
# - "frame-src 'self' https://www.google.com;"
+<<<<<<< HEAD
+=======
+# - "report-uri 'self' http://report-csp.gravitee.io;" # if reportOnly is true, use this callback URL to report
+# - "report-to 'self' 'security@gravitee.io';" # if reportOnly is true, use this email to report
+>>>>>>> 12c6efa872 (AM-688: Do not refer to company.com (#3275))
# # xframe section allows to activate the X-Frame-Options header
# # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options
# # if not action (DENY or SAMEORIGIN) is specified, the X-Frame-Options header will no be set into the response
@@ -321,7 +326,7 @@ gateway:
# enabled: false
# exclude-hosts: # list of hosts to exclude from proxy (wildcard hosts are supported)
# - '*.internal.com'
-# - internal.mycompany.com
+# - internal.gravitee.io
# type: HTTP #HTTP, SOCK4, SOCK5
# http:
# host: localhost
@@ -349,7 +354,7 @@ gateway:
# Organizations and Environments configuration
# Associate this gateway to a list of environments and their organizations. Use hrids to define these values.
-#organizations: mycompany
+#organizations: gravitee
#environments: dev,qa
# Sharding tags configuration
@@ -441,3 +446,15 @@ liquibase:
# limit: 5
# timePeriod: 15
# timeUnit: Minutes
+<<<<<<< HEAD
+=======
+
+#applications:
+# secret:
+# # Algorithms used to hash the client secret.
+# # Can be one of :
+# # "PBKDF2", "BCrypt", "SHA-512", "SHA-256", "None"
+# algorithm: None
+# properties:
+# rounds: 10
+>>>>>>> 12c6efa872 (AM-688: Do not refer to company.com (#3275))
diff --git a/gravitee-am-identityprovider/gravitee-am-identityprovider-http/src/main/resources/schemas/schema-form.json b/gravitee-am-identityprovider/gravitee-am-identityprovider-http/src/main/resources/schemas/schema-form.json
index cb95b6df424..95fc8cdbfd1 100644
--- a/gravitee-am-identityprovider/gravitee-am-identityprovider-http/src/main/resources/schemas/schema-form.json
+++ b/gravitee-am-identityprovider/gravitee-am-identityprovider-http/src/main/resources/schemas/schema-form.json
@@ -117,7 +117,7 @@
"baseURL" : {
"type" : "string",
"title": "Base URL",
- "default": "https://api.company.com/users?username={#user.username}",
+ "default": "https://api.gravitee.io/users?username={#user.username}",
"description": "Resource URL (support EL)"
},
"httpMethod" : {
diff --git a/gravitee-am-management-api/gravitee-am-management-api-rest/src/main/java/io/gravitee/am/management/handlers/management/api/preview/PreviewBuilder.java b/gravitee-am-management-api/gravitee-am-management-api-rest/src/main/java/io/gravitee/am/management/handlers/management/api/preview/PreviewBuilder.java
index 5e34ff69555..080959da6ab 100644
--- a/gravitee-am-management-api/gravitee-am-management-api-rest/src/main/java/io/gravitee/am/management/handlers/management/api/preview/PreviewBuilder.java
+++ b/gravitee-am-management-api/gravitee-am-management-api-rest/src/main/java/io/gravitee/am/management/handlers/management/api/preview/PreviewBuilder.java
@@ -296,7 +296,7 @@ private MapCall your APIs
Most of your applications require data from APIs. Some of those resources have restricted access, so that only authenticated users with sufficient privileges can access them.
curl -X GET \ https://api.mycompany.com/api/v1/data \ -H 'Authorization: Bearer access_token'+======= +
+curl -X GET \ + https://api.gravitee.io/api/v1/data \ + -H 'Authorization: Bearer access_token'+>>>>>>> 12c6efa872 (AM-688: Do not refer to company.com (#3275))
Use your access_token in your request via the Authorization HTTP header to obtain authorized access to the APIs.
curl -X GET \ https://api.mycompany.com/api/v1/data \ +======= ++curl -X GET \ + https://api.gravitee.io/api/v1/data \ +>>>>>>> 12c6efa872 (AM-688: Do not refer to company.com (#3275)) -H 'Authorization: Bearer access_token'
curl -X GET \ - https://api.mycompany.com/api/v1/data \ - -H 'Authorization: Bearer access_token'-=======
curl -X GET \ https://api.gravitee.io/api/v1/data \ -H 'Authorization: Bearer access_token'->>>>>>> 12c6efa872 (AM-688: Do not refer to company.com (#3275))
Use your access_token in your request via the Authorization HTTP header to obtain authorized access to the APIs.
curl -X GET \ - https://api.mycompany.com/api/v1/data \ -=======curl -X GET \ https://api.gravitee.io/api/v1/data \ diff --git a/gravitee-am-ui/src/app/domain/components/emails/email/email.component.html b/gravitee-am-ui/src/app/domain/components/emails/email/email.component.html index 63c2b42157e..ee2351af099 100644 --- a/gravitee-am-ui/src/app/domain/components/emails/email/email.component.html +++ b/gravitee-am-ui/src/app/domain/components/emails/email/email.component.html @@ -36,22 +36,8 @@{{emailName}}
From -<<<<<<< HEAD -The email's FROM address. Example: no-reply@mycompany.com -======= -The email's FROM address. Example: no-reply@gravitee.io ->>>>>>> 12c6efa872 (AM-688: Do not refer to company.com (#3275))From name diff --git a/helm/tests/api-configmap_test.yaml b/helm/tests/api-configmap_test.yaml index c751343a24e..b8ef4159a38 100644 --- a/helm/tests/api-configmap_test.yaml +++ b/helm/tests/api-configmap_test.yaml @@ -579,97 +579,3 @@ tests: - matchRegex: path: data.[gravitee.yml] pattern: "[ ]{12}- /path/to/default/keystore3.pem" -<<<<<<< HEAD -======= - - - - it: should set allowed from - set: - smtp: - allowedfrom: - - email@from - enabled: true - asserts: - - hasDocuments: - count: 1 - - isKind: - of: ConfigMap - - matchRegex: - path: data.[gravitee.yml] - pattern: " *email:\n - * allowedfrom:\n - * - email@from\n - * enabled: true" - - - it: should set allowed from with custom values - set: - smtp: - allowedfrom: - - '*@gravitee.io' - - specific@email.com - enabled: true - asserts: - - hasDocuments: - count: 1 - - isKind: - of: ConfigMap - - matchRegex: - path: data.[gravitee.yml] - pattern: " *email:\n - * allowedfrom:\n - * - '\\*@gravitee\\.io'\n - * - specific@email\\.com\n - * enabled: true" - - - it: should set kubernetes secret config - set: - secrets.kubernetes.enabled: false - secrets.kubernetes.namespace: install-space - secrets.kubernetes.kubeConfigFile: /config/context - secrets.kubernetes.timeoutMS: 400 - asserts: - - hasDocuments: - count: 1 - - isKind: - of: ConfigMap - - matchRegex: - path: data.[gravitee.yml] - pattern: | - secrets: - kubernetes: - enabled: false - kubeConfigFile: /config/context - namespace: install-space - timeoutMS: 400 - - - it: should set default client secret hashing method - asserts: - - hasDocuments: - count: 1 - - isKind: - of: ConfigMap - - matchRegex: - path: data.[gravitee.yml] - pattern: | - applications: - secret: - algorithm: None - - - it: should set custom client secret hashing method - set: - applications.secret.algorithm: BCrypt - applications.secret.properties.rounds: 10 - asserts: - - hasDocuments: - count: 1 - - isKind: - of: ConfigMap - - matchRegex: - path: data.[gravitee.yml] - pattern: | - applications: - secret: - algorithm: BCrypt - properties: - rounds: 10 ->>>>>>> 12c6efa872 (AM-688: Do not refer to company.com (#3275))