diff --git a/gravitee-am-management-api/gravitee-am-management-api-rest/pom.xml b/gravitee-am-management-api/gravitee-am-management-api-rest/pom.xml index bd739aefa90..5eb44dabc05 100644 --- a/gravitee-am-management-api/gravitee-am-management-api-rest/pom.xml +++ b/gravitee-am-management-api/gravitee-am-management-api-rest/pom.xml @@ -50,6 +50,11 @@ gravitee-am-plugins-handlers-identityprovider ${project.version} + + io.gravitee.am.plugins.handlers + gravitee-am-plugins-handlers-dataplane + ${project.version} + diff --git a/gravitee-am-management-api/gravitee-am-management-api-rest/src/main/java/io/gravitee/am/management/handlers/management/api/resources/organizations/environments/DataPlanesResource.java b/gravitee-am-management-api/gravitee-am-management-api-rest/src/main/java/io/gravitee/am/management/handlers/management/api/resources/organizations/environments/DataPlanesResource.java new file mode 100644 index 00000000000..55ab556fc7e --- /dev/null +++ b/gravitee-am-management-api/gravitee-am-management-api-rest/src/main/java/io/gravitee/am/management/handlers/management/api/resources/organizations/environments/DataPlanesResource.java @@ -0,0 +1,72 @@ +/** + * Copyright (C) 2015 The Gravitee team (http://gravitee.io) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.gravitee.am.management.handlers.management.api.resources.organizations.environments; + +import io.gravitee.am.dataplane.api.DataPlane; +import io.gravitee.am.management.handlers.management.api.resources.AbstractResource; +import io.gravitee.am.model.Acl; +import io.gravitee.am.model.permissions.Permission; +import io.gravitee.am.plugins.dataplane.core.MultiDataPlaneLoader; +import io.gravitee.common.http.MediaType; +import io.reactivex.rxjava3.core.Maybe; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.media.ArraySchema; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.responses.ApiResponses; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.PathParam; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.container.AsyncResponse; +import jakarta.ws.rs.container.Suspended; +import org.springframework.beans.factory.annotation.Autowired; + +/** + * @author David BRASSELY (david.brassely at graviteesource.com) + * @author Titouan COMPIEGNE (titouan.compiegne at graviteesource.com) + * @author GraviteeSource Team + */ +@Tag(name = "dataPlane") +public class DataPlanesResource extends AbstractResource { + + @Autowired + private MultiDataPlaneLoader multiDataPlaneLoader; + + @GET + @Produces(MediaType.APPLICATION_JSON) + @Operation( + operationId = "listDataPlanes", + summary = "List of data planes", + description = "List all the data planes accessible to the current user. " + + "User must have DOMAIN[CREATE] permission on the specified environment or organization") + @ApiResponses({ + @ApiResponse(responseCode = "200", description = "List accessible data planes for current user", + content = @Content(mediaType = "application/json", + array = @ArraySchema(schema = @Schema(implementation = DataPlane.class)))), + @ApiResponse(responseCode = "500", description = "Internal server error")}) + public void list( + @PathParam("organizationId") String organizationId, + @PathParam("environmentId") String environmentId, + @Suspended final AsyncResponse response) { + + checkAnyPermission(organizationId, environmentId, Permission.DOMAIN, Acl.CREATE) + .andThen(Maybe.just(multiDataPlaneLoader.getDataPlanes())) + .subscribe(response::resume, response::resume); + } + +} diff --git a/gravitee-am-management-api/gravitee-am-management-api-rest/src/main/java/io/gravitee/am/management/handlers/management/api/resources/organizations/environments/EnvironmentResource.java b/gravitee-am-management-api/gravitee-am-management-api-rest/src/main/java/io/gravitee/am/management/handlers/management/api/resources/organizations/environments/EnvironmentResource.java index b1b0a8ff643..9b4405a69ba 100644 --- a/gravitee-am-management-api/gravitee-am-management-api-rest/src/main/java/io/gravitee/am/management/handlers/management/api/resources/organizations/environments/EnvironmentResource.java +++ b/gravitee-am-management-api/gravitee-am-management-api-rest/src/main/java/io/gravitee/am/management/handlers/management/api/resources/organizations/environments/EnvironmentResource.java @@ -39,4 +39,9 @@ public MembersResource getMembersResource() { public DomainsResource getDomainsResource() { return resourceContext.getResource(DomainsResource.class); } + + @Path("/data-planes") + public DataPlanesResource getDataPlanesResource() { + return resourceContext.getResource(DataPlanesResource.class); + } } diff --git a/gravitee-am-management-api/gravitee-am-management-api-rest/src/test/java/io/gravitee/am/management/handlers/management/api/resources/DomainsResourceTest.java b/gravitee-am-management-api/gravitee-am-management-api-rest/src/test/java/io/gravitee/am/management/handlers/management/api/resources/DomainsResourceTest.java index a67de3fdb8f..ca26bb54f6a 100644 --- a/gravitee-am-management-api/gravitee-am-management-api-rest/src/test/java/io/gravitee/am/management/handlers/management/api/resources/DomainsResourceTest.java +++ b/gravitee-am-management-api/gravitee-am-management-api-rest/src/test/java/io/gravitee/am/management/handlers/management/api/resources/DomainsResourceTest.java @@ -76,10 +76,12 @@ public void shouldGetDomains_technicalManagementException() { public void shouldCreate() { NewDomain newDomain = new NewDomain(); newDomain.setName("domain-name"); + newDomain.setDataPlaneId("data-plane-id"); Domain domain = new Domain(); domain.setId("domain-id"); domain.setName("domain-name"); + domain.setDataPlaneId("data-plane-id"); doReturn(Single.just(domain)).when(domainService).create(eq("DEFAULT"), eq("DEFAULT"), any(), any()); doReturn(Single.just(new IdentityProvider())).when(defaultIdentityProviderService).create(domain.getId()); diff --git a/gravitee-am-management-api/gravitee-am-management-api-service/pom.xml b/gravitee-am-management-api/gravitee-am-management-api-service/pom.xml index 43ed6bac90d..a1f28afd79c 100644 --- a/gravitee-am-management-api/gravitee-am-management-api-service/pom.xml +++ b/gravitee-am-management-api/gravitee-am-management-api-service/pom.xml @@ -125,6 +125,12 @@ ${project.version} + + io.gravitee.am.plugins.handlers + gravitee-am-plugins-handlers-dataplane + ${project.version} + + io.gravitee.cockpit gravitee-cockpit-api diff --git a/gravitee-am-management-api/gravitee-am-management-api-service/src/main/java/io/gravitee/am/management/service/impl/DomainServiceImpl.java b/gravitee-am-management-api/gravitee-am-management-api-service/src/main/java/io/gravitee/am/management/service/impl/DomainServiceImpl.java index 17cc0fe519d..fd601e30814 100644 --- a/gravitee-am-management-api/gravitee-am-management-api-service/src/main/java/io/gravitee/am/management/service/impl/DomainServiceImpl.java +++ b/gravitee-am-management-api/gravitee-am-management-api-service/src/main/java/io/gravitee/am/management/service/impl/DomainServiceImpl.java @@ -23,6 +23,7 @@ import io.gravitee.am.common.utils.GraviteeContext; import io.gravitee.am.common.utils.RandomString; import io.gravitee.am.common.web.UriBuilder; +import io.gravitee.am.dataplane.api.DataPlaneDescription; import io.gravitee.am.identityprovider.api.User; import io.gravitee.am.management.service.DefaultIdentityProviderService; import io.gravitee.am.management.service.DomainService; @@ -40,6 +41,7 @@ import io.gravitee.am.model.membership.MemberType; import io.gravitee.am.model.oidc.OIDCSettings; import io.gravitee.am.model.permissions.SystemRole; +import io.gravitee.am.plugins.dataplane.core.MultiDataPlaneLoader; import io.gravitee.am.repository.management.api.DomainRepository; import io.gravitee.am.repository.management.api.search.AlertNotifierCriteria; import io.gravitee.am.repository.management.api.search.AlertTriggerCriteria; @@ -148,6 +150,8 @@ public class DomainServiceImpl implements DomainService { private final Logger LOGGER = LoggerFactory.getLogger(DomainServiceImpl.class); + @Autowired + private MultiDataPlaneLoader multiDataPlaneLoader; @Lazy @Autowired @@ -337,6 +341,9 @@ public Single create(String organizationId, String environmentId, NewDom LOGGER.debug("Create a new domain: {}", newDomain); // generate hrid String hrid = IdGenerator.generate(newDomain.getName()); + if (multiDataPlaneLoader.getDataPlanes().stream().map(DataPlaneDescription::id).noneMatch(id -> id.equals(newDomain.getDataPlaneId()))) { + return Single.error(new TechnicalManagementException("An error occurred while trying to create a domain. Data plane with provided Id doesn't exist")); + } return domainRepository.findByHrid(ReferenceType.ENVIRONMENT, environmentId, hrid) .isEmpty() .flatMap(empty -> { @@ -357,6 +364,7 @@ public Single create(String organizationId, String environmentId, NewDom domain.setReferenceId(environmentId); domain.setCreatedAt(new Date()); domain.setUpdatedAt(domain.getCreatedAt()); + domain.setDataPlaneId(newDomain.getDataPlaneId()); return environmentService.findById(domain.getReferenceId()) .doOnSuccess(environment -> setDeployMode(domain, environment)) @@ -645,7 +653,7 @@ public Completable delete(GraviteeContext graviteeContext, String domainId, User .principal(principal) .type(EventType.DOMAIN_DELETED) .throwable(throwable) - .domain(domain) + .domain(domain) .reference(Reference.organization(graviteeContext.getOrganizationId())))); }) .onErrorResumeNext(ex -> { diff --git a/gravitee-am-service/src/main/java/io/gravitee/am/service/model/NewDomain.java b/gravitee-am-service/src/main/java/io/gravitee/am/service/model/NewDomain.java index dc660d47ad0..307fc5b3b5c 100644 --- a/gravitee-am-service/src/main/java/io/gravitee/am/service/model/NewDomain.java +++ b/gravitee-am-service/src/main/java/io/gravitee/am/service/model/NewDomain.java @@ -16,11 +16,15 @@ package io.gravitee.am.service.model; import jakarta.validation.constraints.NotNull; +import lombok.Getter; +import lombok.Setter; /** * @author David BRASSELY (david.brassely at graviteesource.com) * @author GraviteeSource Team */ +@Getter +@Setter public class NewDomain { @NotNull @@ -28,21 +32,8 @@ public class NewDomain { private String description; - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } + @NotNull + private String dataPlaneId; @Override public String toString() { diff --git a/gravitee-am-test/api/commands/management/domain-management-commands.ts b/gravitee-am-test/api/commands/management/domain-management-commands.ts index bbcb2e3ff94..3103a0b36a2 100644 --- a/gravitee-am-test/api/commands/management/domain-management-commands.ts +++ b/gravitee-am-test/api/commands/management/domain-management-commands.ts @@ -55,6 +55,7 @@ export const createDomain = (accessToken, name, description): Promise => newDomain: { name: name, description: description, + dataPlaneId: "default" }, }); diff --git a/gravitee-am-test/api/management/.openapi-generator/FILES b/gravitee-am-test/api/management/.openapi-generator/FILES index 384850d3dcd..bc572d29fd8 100644 --- a/gravitee-am-test/api/management/.openapi-generator/FILES +++ b/gravitee-am-test/api/management/.openapi-generator/FILES @@ -4,6 +4,7 @@ apis/AuditApi.ts apis/AuthenticationDeviceNotifierApi.ts apis/BotDetectionApi.ts apis/CertificateApi.ts +apis/DataPlaneApi.ts apis/DefaultApi.ts apis/DeviceIdentifierApi.ts apis/DeviceIdentifiersApi.ts @@ -81,6 +82,7 @@ models/ClientSecret.ts models/CookieSettings.ts models/CorsSettings.ts models/Credential.ts +models/DataPlane.ts models/DeviceIdentifier.ts models/Domain.ts models/DomainUserBulkRequest.ts diff --git a/gravitee-am-test/api/management/apis/DataPlaneApi.ts b/gravitee-am-test/api/management/apis/DataPlaneApi.ts new file mode 100644 index 00000000000..68aae1695af --- /dev/null +++ b/gravitee-am-test/api/management/apis/DataPlaneApi.ts @@ -0,0 +1,90 @@ +/* + * Copyright (C) 2015 The Gravitee team (http://gravitee.io) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/* Gravitee.io - Access Management API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/* tslint:disable */ +/* eslint-disable */ + +import * as runtime from '../runtime'; +import { + DataPlane, + DataPlaneFromJSON, + DataPlaneToJSON, +} from '../models'; + +export interface ListDataPlanesRequest { + organizationId: string; + environmentId: string; +} + +/** + * + */ +export class DataPlaneApi extends runtime.BaseAPI { + + /** + * List all the data planes accessible to the current user. User must have DOMAIN[CREATE] permission on the specified environment or organization + * List of data planes + */ + async listDataPlanesRaw(requestParameters: ListDataPlanesRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise>> { + if (requestParameters.organizationId === null || requestParameters.organizationId === undefined) { + throw new runtime.RequiredError('organizationId','Required parameter requestParameters.organizationId was null or undefined when calling listDataPlanes.'); + } + + if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) { + throw new runtime.RequiredError('environmentId','Required parameter requestParameters.environmentId was null or undefined when calling listDataPlanes.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("gravitee-auth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const response = await this.request({ + path: `/organizations/{organizationId}/environments/{environmentId}/data-planes`.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters.organizationId))).replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(DataPlaneFromJSON)); + } + + /** + * List all the data planes accessible to the current user. User must have DOMAIN[CREATE] permission on the specified environment or organization + * List of data planes + */ + async listDataPlanes(requestParameters: ListDataPlanesRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise> { + const response = await this.listDataPlanesRaw(requestParameters, initOverrides); + return await response.value(); + } + +} diff --git a/gravitee-am-test/api/management/models/ClientRegistrationSettings.ts b/gravitee-am-test/api/management/models/ClientRegistrationSettings.ts index d99b48121e1..fc998f9b8b6 100644 --- a/gravitee-am-test/api/management/models/ClientRegistrationSettings.ts +++ b/gravitee-am-test/api/management/models/ClientRegistrationSettings.ts @@ -67,25 +67,25 @@ export interface ClientRegistrationSettings { * @type {boolean} * @memberof ClientRegistrationSettings */ - dynamicClientRegistrationEnabled?: boolean; + clientTemplateEnabled?: boolean; /** * * @type {boolean} * @memberof ClientRegistrationSettings */ - openDynamicClientRegistrationEnabled?: boolean; + allowedScopesEnabled?: boolean; /** * * @type {boolean} * @memberof ClientRegistrationSettings */ - clientTemplateEnabled?: boolean; + dynamicClientRegistrationEnabled?: boolean; /** * * @type {boolean} * @memberof ClientRegistrationSettings */ - allowedScopesEnabled?: boolean; + openDynamicClientRegistrationEnabled?: boolean; } export function ClientRegistrationSettingsFromJSON(json: any): ClientRegistrationSettings { @@ -103,10 +103,10 @@ export function ClientRegistrationSettingsFromJSONTyped(json: any, ignoreDiscrim 'allowWildCardRedirectUri': !exists(json, 'allowWildCardRedirectUri') ? undefined : json['allowWildCardRedirectUri'], 'defaultScopes': !exists(json, 'defaultScopes') ? undefined : json['defaultScopes'], 'allowedScopes': !exists(json, 'allowedScopes') ? undefined : json['allowedScopes'], - 'dynamicClientRegistrationEnabled': !exists(json, 'dynamicClientRegistrationEnabled') ? undefined : json['dynamicClientRegistrationEnabled'], - 'openDynamicClientRegistrationEnabled': !exists(json, 'openDynamicClientRegistrationEnabled') ? undefined : json['openDynamicClientRegistrationEnabled'], 'clientTemplateEnabled': !exists(json, 'clientTemplateEnabled') ? undefined : json['clientTemplateEnabled'], 'allowedScopesEnabled': !exists(json, 'allowedScopesEnabled') ? undefined : json['allowedScopesEnabled'], + 'dynamicClientRegistrationEnabled': !exists(json, 'dynamicClientRegistrationEnabled') ? undefined : json['dynamicClientRegistrationEnabled'], + 'openDynamicClientRegistrationEnabled': !exists(json, 'openDynamicClientRegistrationEnabled') ? undefined : json['openDynamicClientRegistrationEnabled'], }; } @@ -124,10 +124,10 @@ export function ClientRegistrationSettingsToJSON(value?: ClientRegistrationSetti 'allowWildCardRedirectUri': value.allowWildCardRedirectUri, 'defaultScopes': value.defaultScopes, 'allowedScopes': value.allowedScopes, - 'dynamicClientRegistrationEnabled': value.dynamicClientRegistrationEnabled, - 'openDynamicClientRegistrationEnabled': value.openDynamicClientRegistrationEnabled, 'clientTemplateEnabled': value.clientTemplateEnabled, 'allowedScopesEnabled': value.allowedScopesEnabled, + 'dynamicClientRegistrationEnabled': value.dynamicClientRegistrationEnabled, + 'openDynamicClientRegistrationEnabled': value.openDynamicClientRegistrationEnabled, }; } diff --git a/gravitee-am-test/api/management/models/DataPlane.ts b/gravitee-am-test/api/management/models/DataPlane.ts new file mode 100644 index 00000000000..f78a7f889b9 --- /dev/null +++ b/gravitee-am-test/api/management/models/DataPlane.ts @@ -0,0 +1,77 @@ +/* + * Copyright (C) 2015 The Gravitee team (http://gravitee.io) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/* Gravitee.io - Access Management API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/* tslint:disable */ +/* eslint-disable */ +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface DataPlane + */ +export interface DataPlane { + /** + * + * @type {string} + * @memberof DataPlane + */ + id?: string; + /** + * + * @type {string} + * @memberof DataPlane + */ + name?: string; +} + +export function DataPlaneFromJSON(json: any): DataPlane { + return DataPlaneFromJSONTyped(json, false); +} + +export function DataPlaneFromJSONTyped(json: any, ignoreDiscriminator: boolean): DataPlane { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'id': !exists(json, 'id') ? undefined : json['id'], + 'name': !exists(json, 'name') ? undefined : json['name'], + }; +} + +export function DataPlaneToJSON(value?: DataPlane | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'id': value.id, + 'name': value.name, + }; +} + diff --git a/gravitee-am-test/api/management/models/Domain.ts b/gravitee-am-test/api/management/models/Domain.ts index 3b2a522d63f..f26cb6e6759 100644 --- a/gravitee-am-test/api/management/models/Domain.ts +++ b/gravitee-am-test/api/management/models/Domain.ts @@ -261,48 +261,54 @@ export interface Domain { * @memberof Domain */ corsSettings?: CorsSettings; + /** + * + * @type {string} + * @memberof Domain + */ + dataPlaneId?: string; /** * * @type {boolean} * @memberof Domain */ - dynamicClientRegistrationEnabled?: boolean; + redirectUriLocalhostAllowed?: boolean; /** * * @type {boolean} * @memberof Domain */ - openDynamicClientRegistrationEnabled?: boolean; + redirectUriUnsecuredHttpSchemeAllowed?: boolean; /** * * @type {boolean} * @memberof Domain */ - redirectUriStrictMatching?: boolean; + redirectUriWildcardAllowed?: boolean; /** * * @type {boolean} * @memberof Domain */ - dynamicClientRegistrationTemplateEnabled?: boolean; + dynamicClientRegistrationEnabled?: boolean; /** * * @type {boolean} * @memberof Domain */ - redirectUriLocalhostAllowed?: boolean; + openDynamicClientRegistrationEnabled?: boolean; /** * * @type {boolean} * @memberof Domain */ - redirectUriUnsecuredHttpSchemeAllowed?: boolean; + redirectUriStrictMatching?: boolean; /** * * @type {boolean} * @memberof Domain */ - redirectUriWildcardAllowed?: boolean; + dynamicClientRegistrationTemplateEnabled?: boolean; } @@ -365,13 +371,14 @@ export function DomainFromJSONTyped(json: any, ignoreDiscriminator: boolean): Do 'selfServiceAccountManagementSettings': !exists(json, 'selfServiceAccountManagementSettings') ? undefined : SelfServiceAccountManagementSettingsFromJSON(json['selfServiceAccountManagementSettings']), 'saml': !exists(json, 'saml') ? undefined : SAMLSettingsFromJSON(json['saml']), 'corsSettings': !exists(json, 'corsSettings') ? undefined : CorsSettingsFromJSON(json['corsSettings']), + 'dataPlaneId': !exists(json, 'dataPlaneId') ? undefined : json['dataPlaneId'], + 'redirectUriLocalhostAllowed': !exists(json, 'redirectUriLocalhostAllowed') ? undefined : json['redirectUriLocalhostAllowed'], + 'redirectUriUnsecuredHttpSchemeAllowed': !exists(json, 'redirectUriUnsecuredHttpSchemeAllowed') ? undefined : json['redirectUriUnsecuredHttpSchemeAllowed'], + 'redirectUriWildcardAllowed': !exists(json, 'redirectUriWildcardAllowed') ? undefined : json['redirectUriWildcardAllowed'], 'dynamicClientRegistrationEnabled': !exists(json, 'dynamicClientRegistrationEnabled') ? undefined : json['dynamicClientRegistrationEnabled'], 'openDynamicClientRegistrationEnabled': !exists(json, 'openDynamicClientRegistrationEnabled') ? undefined : json['openDynamicClientRegistrationEnabled'], 'redirectUriStrictMatching': !exists(json, 'redirectUriStrictMatching') ? undefined : json['redirectUriStrictMatching'], 'dynamicClientRegistrationTemplateEnabled': !exists(json, 'dynamicClientRegistrationTemplateEnabled') ? undefined : json['dynamicClientRegistrationTemplateEnabled'], - 'redirectUriLocalhostAllowed': !exists(json, 'redirectUriLocalhostAllowed') ? undefined : json['redirectUriLocalhostAllowed'], - 'redirectUriUnsecuredHttpSchemeAllowed': !exists(json, 'redirectUriUnsecuredHttpSchemeAllowed') ? undefined : json['redirectUriUnsecuredHttpSchemeAllowed'], - 'redirectUriWildcardAllowed': !exists(json, 'redirectUriWildcardAllowed') ? undefined : json['redirectUriWildcardAllowed'], }; } @@ -411,13 +418,14 @@ export function DomainToJSON(value?: Domain | null): any { 'selfServiceAccountManagementSettings': SelfServiceAccountManagementSettingsToJSON(value.selfServiceAccountManagementSettings), 'saml': SAMLSettingsToJSON(value.saml), 'corsSettings': CorsSettingsToJSON(value.corsSettings), + 'dataPlaneId': value.dataPlaneId, + 'redirectUriLocalhostAllowed': value.redirectUriLocalhostAllowed, + 'redirectUriUnsecuredHttpSchemeAllowed': value.redirectUriUnsecuredHttpSchemeAllowed, + 'redirectUriWildcardAllowed': value.redirectUriWildcardAllowed, 'dynamicClientRegistrationEnabled': value.dynamicClientRegistrationEnabled, 'openDynamicClientRegistrationEnabled': value.openDynamicClientRegistrationEnabled, 'redirectUriStrictMatching': value.redirectUriStrictMatching, 'dynamicClientRegistrationTemplateEnabled': value.dynamicClientRegistrationTemplateEnabled, - 'redirectUriLocalhostAllowed': value.redirectUriLocalhostAllowed, - 'redirectUriUnsecuredHttpSchemeAllowed': value.redirectUriUnsecuredHttpSchemeAllowed, - 'redirectUriWildcardAllowed': value.redirectUriWildcardAllowed, }; } diff --git a/gravitee-am-test/api/management/models/NewDomain.ts b/gravitee-am-test/api/management/models/NewDomain.ts index 04ccef91149..07dd4499428 100644 --- a/gravitee-am-test/api/management/models/NewDomain.ts +++ b/gravitee-am-test/api/management/models/NewDomain.ts @@ -44,6 +44,12 @@ export interface NewDomain { * @memberof NewDomain */ description?: string; + /** + * + * @type {string} + * @memberof NewDomain + */ + dataPlaneId: string; } export function NewDomainFromJSON(json: any): NewDomain { @@ -58,6 +64,7 @@ export function NewDomainFromJSONTyped(json: any, ignoreDiscriminator: boolean): 'name': json['name'], 'description': !exists(json, 'description') ? undefined : json['description'], + 'dataPlaneId': json['dataPlaneId'], }; } @@ -72,6 +79,7 @@ export function NewDomainToJSON(value?: NewDomain | null): any { 'name': value.name, 'description': value.description, + 'dataPlaneId': value.dataPlaneId, }; } diff --git a/gravitee-am-test/api/management/models/NewOrganizationUser.ts b/gravitee-am-test/api/management/models/NewOrganizationUser.ts index e904a118d85..1b60995a40a 100644 --- a/gravitee-am-test/api/management/models/NewOrganizationUser.ts +++ b/gravitee-am-test/api/management/models/NewOrganizationUser.ts @@ -164,6 +164,12 @@ export interface NewOrganizationUser { * @memberof NewOrganizationUser */ forceResetPassword?: boolean; + /** + * + * @type {Date} + * @memberof NewOrganizationUser + */ + lastPasswordReset?: Date; /** * * @type {string} @@ -210,6 +216,7 @@ export function NewOrganizationUserFromJSONTyped(json: any, ignoreDiscriminator: 'createdAt': !exists(json, 'createdAt') ? undefined : (new Date(json['createdAt'])), 'updatedAt': !exists(json, 'updatedAt') ? undefined : (new Date(json['updatedAt'])), 'forceResetPassword': !exists(json, 'forceResetPassword') ? undefined : json['forceResetPassword'], + 'lastPasswordReset': !exists(json, 'lastPasswordReset') ? undefined : (new Date(json['lastPasswordReset'])), 'email': !exists(json, 'email') ? undefined : json['email'], 'serviceAccount': !exists(json, 'serviceAccount') ? undefined : json['serviceAccount'], }; @@ -246,6 +253,7 @@ export function NewOrganizationUserToJSON(value?: NewOrganizationUser | null): a 'createdAt': value.createdAt === undefined ? undefined : (value.createdAt.toISOString()), 'updatedAt': value.updatedAt === undefined ? undefined : (value.updatedAt.toISOString()), 'forceResetPassword': value.forceResetPassword, + 'lastPasswordReset': value.lastPasswordReset === undefined ? undefined : (value.lastPasswordReset.toISOString()), 'email': value.email, 'serviceAccount': value.serviceAccount, }; diff --git a/gravitee-am-test/api/management/models/NewUser.ts b/gravitee-am-test/api/management/models/NewUser.ts index 89e97e9efd3..bf01734f2bb 100644 --- a/gravitee-am-test/api/management/models/NewUser.ts +++ b/gravitee-am-test/api/management/models/NewUser.ts @@ -164,6 +164,12 @@ export interface NewUser { * @memberof NewUser */ forceResetPassword?: boolean; + /** + * + * @type {Date} + * @memberof NewUser + */ + lastPasswordReset?: Date; /** * * @type {string} @@ -204,6 +210,7 @@ export function NewUserFromJSONTyped(json: any, ignoreDiscriminator: boolean): N 'createdAt': !exists(json, 'createdAt') ? undefined : (new Date(json['createdAt'])), 'updatedAt': !exists(json, 'updatedAt') ? undefined : (new Date(json['updatedAt'])), 'forceResetPassword': !exists(json, 'forceResetPassword') ? undefined : json['forceResetPassword'], + 'lastPasswordReset': !exists(json, 'lastPasswordReset') ? undefined : (new Date(json['lastPasswordReset'])), 'email': !exists(json, 'email') ? undefined : json['email'], }; } @@ -239,6 +246,7 @@ export function NewUserToJSON(value?: NewUser | null): any { 'createdAt': value.createdAt === undefined ? undefined : (value.createdAt.toISOString()), 'updatedAt': value.updatedAt === undefined ? undefined : (value.updatedAt.toISOString()), 'forceResetPassword': value.forceResetPassword, + 'lastPasswordReset': value.lastPasswordReset === undefined ? undefined : (value.lastPasswordReset.toISOString()), 'email': value.email, }; } diff --git a/gravitee-am-test/api/management/models/PatchClientRegistrationSettings.ts b/gravitee-am-test/api/management/models/PatchClientRegistrationSettings.ts index 5afdfe423f8..e652d7f720d 100644 --- a/gravitee-am-test/api/management/models/PatchClientRegistrationSettings.ts +++ b/gravitee-am-test/api/management/models/PatchClientRegistrationSettings.ts @@ -73,19 +73,19 @@ export interface PatchClientRegistrationSettings { * @type {boolean} * @memberof PatchClientRegistrationSettings */ - dynamicClientRegistrationEnabled?: boolean; + clientTemplateEnabled?: boolean; /** * * @type {boolean} * @memberof PatchClientRegistrationSettings */ - openDynamicClientRegistrationEnabled?: boolean; + dynamicClientRegistrationEnabled?: boolean; /** * * @type {boolean} * @memberof PatchClientRegistrationSettings */ - clientTemplateEnabled?: boolean; + openDynamicClientRegistrationEnabled?: boolean; } export function PatchClientRegistrationSettingsFromJSON(json: any): PatchClientRegistrationSettings { @@ -104,9 +104,9 @@ export function PatchClientRegistrationSettingsFromJSONTyped(json: any, ignoreDi 'defaultScopes': !exists(json, 'defaultScopes') ? undefined : json['defaultScopes'], 'isAllowedScopesEnabled': !exists(json, 'isAllowedScopesEnabled') ? undefined : json['isAllowedScopesEnabled'], 'allowedScopes': !exists(json, 'allowedScopes') ? undefined : json['allowedScopes'], + 'clientTemplateEnabled': !exists(json, 'clientTemplateEnabled') ? undefined : json['clientTemplateEnabled'], 'dynamicClientRegistrationEnabled': !exists(json, 'dynamicClientRegistrationEnabled') ? undefined : json['dynamicClientRegistrationEnabled'], 'openDynamicClientRegistrationEnabled': !exists(json, 'openDynamicClientRegistrationEnabled') ? undefined : json['openDynamicClientRegistrationEnabled'], - 'clientTemplateEnabled': !exists(json, 'clientTemplateEnabled') ? undefined : json['clientTemplateEnabled'], }; } @@ -125,9 +125,9 @@ export function PatchClientRegistrationSettingsToJSON(value?: PatchClientRegistr 'defaultScopes': value.defaultScopes, 'isAllowedScopesEnabled': value.isAllowedScopesEnabled, 'allowedScopes': value.allowedScopes, + 'clientTemplateEnabled': value.clientTemplateEnabled, 'dynamicClientRegistrationEnabled': value.dynamicClientRegistrationEnabled, 'openDynamicClientRegistrationEnabled': value.openDynamicClientRegistrationEnabled, - 'clientTemplateEnabled': value.clientTemplateEnabled, }; } diff --git a/gravitee-am-test/api/management/models/User.ts b/gravitee-am-test/api/management/models/User.ts index cf3bfdc94a8..72ffb899ef4 100644 --- a/gravitee-am-test/api/management/models/User.ts +++ b/gravitee-am-test/api/management/models/User.ts @@ -422,13 +422,13 @@ export interface User { * @type {string} * @memberof User */ - zoneInfo?: string; + locale?: string; /** * * @type {string} * @memberof User */ - locale?: string; + zoneInfo?: string; /** * * @type {string} @@ -566,8 +566,8 @@ export function UserFromJSONTyped(json: any, ignoreDiscriminator: boolean): User 'forceResetPassword': !exists(json, 'forceResetPassword') ? undefined : json['forceResetPassword'], 'serviceAccount': !exists(json, 'serviceAccount') ? undefined : json['serviceAccount'], 'address': !exists(json, 'address') ? undefined : json['address'], - 'zoneInfo': !exists(json, 'zoneInfo') ? undefined : json['zoneInfo'], 'locale': !exists(json, 'locale') ? undefined : json['locale'], + 'zoneInfo': !exists(json, 'zoneInfo') ? undefined : json['zoneInfo'], 'middleName': !exists(json, 'middleName') ? undefined : json['middleName'], 'lastIdentityInformation': !exists(json, 'lastIdentityInformation') ? undefined : json['lastIdentityInformation'], 'identitiesAsMap': !exists(json, 'identitiesAsMap') ? undefined : json['identitiesAsMap'], @@ -646,8 +646,8 @@ export function UserToJSON(value?: User | null): any { 'forceResetPassword': value.forceResetPassword, 'serviceAccount': value.serviceAccount, 'address': value.address, - 'zoneInfo': value.zoneInfo, 'locale': value.locale, + 'zoneInfo': value.zoneInfo, 'middleName': value.middleName, 'lastIdentityInformation': value.lastIdentityInformation, 'identitiesAsMap': value.identitiesAsMap, diff --git a/gravitee-am-test/api/management/models/UserEntity.ts b/gravitee-am-test/api/management/models/UserEntity.ts index 338b62407a1..78f938695b6 100644 --- a/gravitee-am-test/api/management/models/UserEntity.ts +++ b/gravitee-am-test/api/management/models/UserEntity.ts @@ -440,13 +440,13 @@ export interface UserEntity { * @type {string} * @memberof UserEntity */ - zoneInfo?: string; + locale?: string; /** * * @type {string} * @memberof UserEntity */ - locale?: string; + zoneInfo?: string; /** * * @type {string} @@ -586,8 +586,8 @@ export function UserEntityFromJSONTyped(json: any, ignoreDiscriminator: boolean) 'applicationEntity': !exists(json, 'applicationEntity') ? undefined : ApplicationEntityFromJSON(json['applicationEntity']), 'sourceId': !exists(json, 'sourceId') ? undefined : json['sourceId'], 'address': !exists(json, 'address') ? undefined : json['address'], - 'zoneInfo': !exists(json, 'zoneInfo') ? undefined : json['zoneInfo'], 'locale': !exists(json, 'locale') ? undefined : json['locale'], + 'zoneInfo': !exists(json, 'zoneInfo') ? undefined : json['zoneInfo'], 'middleName': !exists(json, 'middleName') ? undefined : json['middleName'], 'lastIdentityInformation': !exists(json, 'lastIdentityInformation') ? undefined : json['lastIdentityInformation'], 'identitiesAsMap': !exists(json, 'identitiesAsMap') ? undefined : json['identitiesAsMap'], @@ -668,8 +668,8 @@ export function UserEntityToJSON(value?: UserEntity | null): any { 'applicationEntity': ApplicationEntityToJSON(value.applicationEntity), 'sourceId': value.sourceId, 'address': value.address, - 'zoneInfo': value.zoneInfo, 'locale': value.locale, + 'zoneInfo': value.zoneInfo, 'middleName': value.middleName, 'lastIdentityInformation': value.lastIdentityInformation, 'identitiesAsMap': value.identitiesAsMap, diff --git a/gravitee-am-test/api/management/models/index.ts b/gravitee-am-test/api/management/models/index.ts index 0a0f3853635..971ab8e1fab 100644 --- a/gravitee-am-test/api/management/models/index.ts +++ b/gravitee-am-test/api/management/models/index.ts @@ -71,6 +71,7 @@ export * from './ClientSecret'; export * from './CookieSettings'; export * from './CorsSettings'; export * from './Credential'; +export * from './DataPlane'; export * from './DeviceIdentifier'; export * from './Domain'; export * from './DomainUserBulkRequest'; diff --git a/gravitee-am-ui/src/app/app-routing.module.ts b/gravitee-am-ui/src/app/app-routing.module.ts index a781dfa86ac..b441b7901fc 100644 --- a/gravitee-am-ui/src/app/app-routing.module.ts +++ b/gravitee-am-ui/src/app/app-routing.module.ts @@ -245,6 +245,7 @@ import { DomainPasswordPolicyComponent } from './domain/settings/password-policy import { PasswordPolicyResolver } from './resolvers/password-policy-resolver'; import { PasswordPoliciesResolver } from './resolvers/password-policies-resolver.service'; import { ProviderGroupsComponent } from './domain/settings/providers/provider/groups/groups/groups.component'; +import { DataPlanesResolver } from './resolvers/data-planes.resolver'; const applyOnLabel = (label) => label.toLowerCase().replace(/_/g, ' '); @@ -850,6 +851,7 @@ export const routes: Routes = [ component: DomainCreationComponent, resolve: { environment: EnvironmentResolver, + dataPlanes: DataPlanesResolver, }, canActivate: [AuthGuard], data: { diff --git a/gravitee-am-ui/src/app/app.module.ts b/gravitee-am-ui/src/app/app.module.ts index 4bce424ccb6..5ca30f1f399 100644 --- a/gravitee-am-ui/src/app/app.module.ts +++ b/gravitee-am-ui/src/app/app.module.ts @@ -449,6 +449,8 @@ import { PasswordPolicyService } from './services/password-policy.service'; import { CreateGroupMapperComponent, ProviderGroupsComponent } from './domain/settings/providers/provider/groups/groups/groups.component'; import { IdentitiesOrganizationResolver } from './resolvers/identities-organization.resolver'; import { PasswordPolicyStatusComponent } from './domain/settings/password-policy/pass-policy-status/password-policy-status.component'; +import { DataPlaneService } from './services/data-plane.service'; +import { DataPlanesResolver } from './resolvers/data-planes.resolver'; @NgModule({ declarations: [ @@ -893,6 +895,8 @@ import { PasswordPolicyStatusComponent } from './domain/settings/password-policy PasswordPoliciesResolver, PasswordPolicyResolver, PasswordPolicyService, + DataPlaneService, + DataPlanesResolver, { provide: HTTP_INTERCEPTORS, useClass: HttpRequestInterceptor, diff --git a/gravitee-am-ui/src/app/domain/creation/domain-creation.component.html b/gravitee-am-ui/src/app/domain/creation/domain-creation.component.html index 060a22f5973..bddc7cc5b71 100644 --- a/gravitee-am-ui/src/app/domain/creation/domain-creation.component.html +++ b/gravitee-am-ui/src/app/domain/creation/domain-creation.component.html @@ -17,7 +17,10 @@ -->
<< home<< + home +

New domain

@@ -27,13 +30,25 @@

New domain

A name for your security domain. The security domain's name is used to generate the security domain's path. The security - domain's path will be used as a context path for the API operations. + domain's path will be used as a context path for the API operations. + + A description for your security domain. + @if (!oneDataPlane) { + + Data Plane + + @for (dp of dataPlanes; track dp) { + {{ dp.name }} + } + + Data plane to be used with this domain. + + }
New domain fxLayoutAlign="center center" style="margin-top: 20px; border-top: 1px solid #e2e5e7; padding: 10px" > - CREATE + CREATE CANCEL
diff --git a/gravitee-am-ui/src/app/domain/creation/domain-creation.component.ts b/gravitee-am-ui/src/app/domain/creation/domain-creation.component.ts index 71df851da83..d8d2f1afe32 100644 --- a/gravitee-am-ui/src/app/domain/creation/domain-creation.component.ts +++ b/gravitee-am-ui/src/app/domain/creation/domain-creation.component.ts @@ -27,7 +27,9 @@ import { SnackbarService } from '../../services/snackbar.service'; }) export class DomainCreationComponent implements OnInit { domain: any = {}; + dataPlanes: any[]; displayNavLink: boolean; + oneDataPlane = false; @ViewChild('createDomainBtn', { static: true }) createDomainBtn: any; constructor( @@ -39,6 +41,11 @@ export class DomainCreationComponent implements OnInit { ngOnInit() { this.displayNavLink = !this.router.url.startsWith('/settings'); + this.dataPlanes = this.route.snapshot.data['dataPlanes']; + if (this.dataPlanes.length === 1) { + this.domain.dataPlaneId = this.dataPlanes[0].id; + this.oneDataPlane = true; + } } create() { diff --git a/gravitee-am-ui/src/app/resolvers/data-planes.resolver.spec.ts b/gravitee-am-ui/src/app/resolvers/data-planes.resolver.spec.ts new file mode 100644 index 00000000000..33f9657b433 --- /dev/null +++ b/gravitee-am-ui/src/app/resolvers/data-planes.resolver.spec.ts @@ -0,0 +1,32 @@ +/* + * Copyright (C) 2015 The Gravitee team (http://gravitee.io) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { TestBed } from '@angular/core/testing'; +import { ResolveFn } from '@angular/router'; + +import { dataPlanesResolver } from './data-planes.resolver'; + +describe('dataPlanesResolver', () => { + const executeResolver: ResolveFn = (...resolverParameters) => + TestBed.runInInjectionContext(() => dataPlanesResolver(...resolverParameters)); + + beforeEach(() => { + TestBed.configureTestingModule({}); + }); + + it('should be created', () => { + expect(executeResolver).toBeTruthy(); + }); +}); diff --git a/gravitee-am-ui/src/app/resolvers/data-planes.resolver.ts b/gravitee-am-ui/src/app/resolvers/data-planes.resolver.ts new file mode 100644 index 00000000000..9a7c9a2b875 --- /dev/null +++ b/gravitee-am-ui/src/app/resolvers/data-planes.resolver.ts @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2015 The Gravitee team (http://gravitee.io) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { Injectable } from '@angular/core'; +import { Observable } from 'rxjs'; + +import { DataPlaneService } from '../services/data-plane.service'; + +@Injectable() +export class DataPlanesResolver { + constructor(private dataPlaneService: DataPlaneService) {} + + resolve(): Observable { + return this.dataPlaneService.list(); + } +} diff --git a/gravitee-am-ui/src/app/services/data-plane.service.spec.ts b/gravitee-am-ui/src/app/services/data-plane.service.spec.ts new file mode 100644 index 00000000000..9c48a801e8d --- /dev/null +++ b/gravitee-am-ui/src/app/services/data-plane.service.spec.ts @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2015 The Gravitee team (http://gravitee.io) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { TestBed } from '@angular/core/testing'; + +import { DataPlaneService } from './data-plane.service'; + +describe('DataPlaneService', () => { + let service: DataPlaneService; + + beforeEach(() => { + TestBed.configureTestingModule({}); + service = TestBed.inject(DataPlaneService); + }); + + it('should be created', () => { + expect(service).toBeTruthy(); + }); +}); diff --git a/gravitee-am-ui/src/app/services/data-plane.service.ts b/gravitee-am-ui/src/app/services/data-plane.service.ts new file mode 100644 index 00000000000..85aba60112f --- /dev/null +++ b/gravitee-am-ui/src/app/services/data-plane.service.ts @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2015 The Gravitee team (http://gravitee.io) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { Injectable } from '@angular/core'; +import { HttpClient } from '@angular/common/http'; +import { Observable } from 'rxjs'; + +import { AppConfig } from '../../config/app.config'; + +@Injectable() +export class DataPlaneService { + private baseURL: string = AppConfig.settings.environmentBaseURL; + constructor(private http: HttpClient) {} + + list(): Observable { + return this.http.get(this.baseURL + '/data-planes'); + } +} diff --git a/gravitee-am-ui/src/main.ts b/gravitee-am-ui/src/main.ts index ce65d552027..d764fbd0cdb 100644 --- a/gravitee-am-ui/src/main.ts +++ b/gravitee-am-ui/src/main.ts @@ -58,6 +58,7 @@ forkJoin([constants, build]).subscribe((response) => { Object.keys(response[1]).forEach((key) => (AppConfig.settings[key] = response[1][key])); AppConfig.settings.portalTitle = PORTAL_TITLE; AppConfig.settings.organizationBaseURL = AppConfig.settings.baseURL + '/organizations/' + DEFAULT_ORGANIZATION; + AppConfig.settings.environmentBaseURL = AppConfig.settings.organizationBaseURL + '/environments/' + DEFAULT_ENV; AppConfig.settings.domainBaseURL = AppConfig.settings.organizationBaseURL + '/environments/' + DEFAULT_ENV + '/domains/'; const resourceURL = `${AppConfig.settings.baseURL}/platform/license`; const trialResourceURL = 'https://gravitee.io/self-hosted-trial'; diff --git a/postman/collections/graviteeio-am-api-management-collection.json b/postman/collections/graviteeio-am-api-management-collection.json index 11d5c9f78a0..d80557b7ad1 100644 --- a/postman/collections/graviteeio-am-api-management-collection.json +++ b/postman/collections/graviteeio-am-api-management-collection.json @@ -751,7 +751,7 @@ ], "body": { "mode": "raw", - "raw": "{\n\t\"name\": \"social\", \n\t\"description\": \"test management login with social provider\"\n}" + "raw": "{\n\t\"name\": \"social\", \n\t\"description\": \"test management login with social provider\", \n\t\"dataPlaneId\": \"default\"\n}" }, "url": { "raw": "{{management_url}}/management/organizations/{{defaultOrganizationId}}/environments/{{defaultEnvironmentId}}/domains/", @@ -1941,7 +1941,7 @@ ], "body": { "mode": "raw", - "raw": "{\n\t\"name\": \"alert\", \n\t\"description\": \"test alerting on domain\"\n}" + "raw": "{\n\t\"name\": \"alert\", \n\t\"description\": \"test alerting on domain\", \n\t\"dataPlaneId\": \"default\"\n}" }, "url": { "raw": "{{management_url}}/management/organizations/{{defaultOrganizationId}}/environments/{{defaultEnvironmentId}}/domains/", @@ -2381,4 +2381,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/postman/collections/graviteeio-am-client-management-collection-app-version.json b/postman/collections/graviteeio-am-client-management-collection-app-version.json index 7d66317ced6..e87af7de607 100644 --- a/postman/collections/graviteeio-am-client-management-collection-app-version.json +++ b/postman/collections/graviteeio-am-client-management-collection-app-version.json @@ -102,7 +102,7 @@ ], "body": { "mode": "raw", - "raw": "{\n\t\"name\": \"applications-app-version\", \n\t\"description\": \"test application management through Access Management API\"\n}" + "raw": "{\n\t\"name\": \"applications-app-version\", \n\t\"description\": \"test application management through Access Management API\", \n\t\"dataPlaneId\": \"default\"\n}" }, "url": { "raw": "{{management_url}}/management/organizations/{{defaultOrganizationId}}/environments/{{defaultEnvironmentId}}/domains/", @@ -1255,4 +1255,4 @@ "response": [] } ] -} \ No newline at end of file +} diff --git a/postman/collections/graviteeio-am-flows-collection-app-version.json b/postman/collections/graviteeio-am-flows-collection-app-version.json index cf56203845c..2becce4a300 100644 --- a/postman/collections/graviteeio-am-flows-collection-app-version.json +++ b/postman/collections/graviteeio-am-flows-collection-app-version.json @@ -103,7 +103,7 @@ ], "body": { "mode": "raw", - "raw": "{\n\t\"name\": \"flows-app-version\", \n\t\"description\": \"test flows\"\n}" + "raw": "{\n\t\"name\": \"flows-app-version\", \n\t\"description\": \"test flows\", \n\t\"dataPlaneId\": \"default\"\n}" }, "url": { "raw": "{{management_url}}/management/organizations/{{defaultOrganizationId}}/environments/{{defaultEnvironmentId}}/domains/", @@ -1580,4 +1580,4 @@ "response": [] } ] -} \ No newline at end of file +} diff --git a/postman/collections/graviteeio-am-login-collection-app-version.json b/postman/collections/graviteeio-am-login-collection-app-version.json index 2a2083f5d87..faec04daf9d 100644 --- a/postman/collections/graviteeio-am-login-collection-app-version.json +++ b/postman/collections/graviteeio-am-login-collection-app-version.json @@ -103,7 +103,7 @@ ], "body": { "mode": "raw", - "raw": "{\n\t\"name\": \"login-app-version\", \n\t\"description\": \"test login flows\"\n}" + "raw": "{\n\t\"name\": \"login-app-version\", \n\t\"description\": \"test login flows\", \n\t\"dataPlaneId\": \"default\"\n}" }, "url": { "raw": "{{management_url}}/management/organizations/{{defaultOrganizationId}}/environments/{{defaultEnvironmentId}}/domains/", @@ -16386,4 +16386,4 @@ } } ] -} \ No newline at end of file +} diff --git a/postman/collections/graviteeio-am-logout-collection-app-version.json b/postman/collections/graviteeio-am-logout-collection-app-version.json index c39465de034..83cb7129080 100644 --- a/postman/collections/graviteeio-am-logout-collection-app-version.json +++ b/postman/collections/graviteeio-am-logout-collection-app-version.json @@ -103,7 +103,7 @@ ], "body": { "mode": "raw", - "raw": "{\n\t\"name\": \"logout-app-version\", \n\t\"description\": \"test logout flows\"\n}" + "raw": "{\n\t\"name\": \"logout-app-version\", \n\t\"description\": \"test logout flows\", \n\t\"dataPlaneId\": \"default\"\n}" }, "url": { "raw": "{{management_url}}/management/organizations/{{defaultOrganizationId}}/environments/{{defaultEnvironmentId}}/domains/", @@ -1757,4 +1757,4 @@ "response": [] } ] -} \ No newline at end of file +} diff --git a/postman/collections/graviteeio-am-oauth2-collection-app-version.json b/postman/collections/graviteeio-am-oauth2-collection-app-version.json index 273d274376f..5d6efeb1828 100644 --- a/postman/collections/graviteeio-am-oauth2-collection-app-version.json +++ b/postman/collections/graviteeio-am-oauth2-collection-app-version.json @@ -104,7 +104,7 @@ ], "body": { "mode": "raw", - "raw": "{\n\t\"name\": \"oauth2-app-version\", \n\t\"description\": \"test oauth2 authorization framework specifications\"\n}" + "raw": "{\n\t\"name\": \"oauth2-app-version\", \n\t\"description\": \"test oauth2 authorization framework specifications\", \n\t\"dataPlaneId\": \"default\"\n}" }, "url": { "raw": "{{management_url}}/management/organizations/{{defaultOrganizationId}}/environments/{{defaultEnvironmentId}}/domains/", @@ -13487,7 +13487,7 @@ ], "body": { "mode": "raw", - "raw": "{\n\t\"name\": \"cross-app-version\", \n\t\"description\": \"test cross domain authorization framework specifications\"\n}" + "raw": "{\n\t\"name\": \"cross-app-version\", \n\t\"description\": \"test cross domain authorization framework specifications\", \n\t\"dataPlaneId\": \"default\"\n}" }, "url": { "raw": "{{management_url}}/management/organizations/{{defaultOrganizationId}}/environments/{{defaultEnvironmentId}}/domains/", diff --git a/postman/collections/graviteeio-am-oauth2-par-version.json b/postman/collections/graviteeio-am-oauth2-par-version.json index f9ba2d3710a..199685945e3 100644 --- a/postman/collections/graviteeio-am-oauth2-par-version.json +++ b/postman/collections/graviteeio-am-oauth2-par-version.json @@ -104,7 +104,7 @@ ], "body": { "mode": "raw", - "raw": "{\n\t\"name\": \"oauth2-par\", \n\t\"description\": \"test oauth2 authorization framework specifications using PAR\"\n}" + "raw": "{\n\t\"name\": \"oauth2-par\", \n\t\"description\": \"test oauth2 authorization framework specifications using PAR\", \n\t\"dataPlaneId\": \"default\"\n}" }, "url": { "raw": "{{management_url}}/management/organizations/{{defaultOrganizationId}}/environments/{{defaultEnvironmentId}}/domains/", diff --git a/postman/collections/graviteeio-am-openid-ciba-collection.json b/postman/collections/graviteeio-am-openid-ciba-collection.json index 73bc2cd97b8..a2941954f58 100644 --- a/postman/collections/graviteeio-am-openid-ciba-collection.json +++ b/postman/collections/graviteeio-am-openid-ciba-collection.json @@ -155,7 +155,7 @@ ], "body": { "mode": "raw", - "raw": "{\n\t\"name\": \"ciba\", \n\t\"description\": \"test OpenID Connect Client-Initiated Backchannel Authentication Flow specifications\"\n}" + "raw": "{\n\t\"name\": \"ciba\", \n\t\"description\": \"test OpenID Connect Client-Initiated Backchannel Authentication Flow specifications\", \n\t\"dataPlaneId\": \"default\"\n}" }, "url": { "raw": "{{management_url}}/management/organizations/{{defaultOrganizationId}}/environments/{{defaultEnvironmentId}}/domains/", @@ -211,7 +211,7 @@ ], "body": { "mode": "raw", - "raw": "{\n\t\"name\": \"notciba\", \n\t\"description\": \"standard domain without CIBA enabled\"\n}" + "raw": "{\n\t\"name\": \"notciba\", \n\t\"description\": \"standard domain without CIBA enabled\", \n\t\"dataPlaneId\": \"default\"\n}" }, "url": { "raw": "{{management_url}}/management/organizations/{{defaultOrganizationId}}/environments/{{defaultEnvironmentId}}/domains/", diff --git a/postman/collections/graviteeio-am-openid-core-collection-app-version.json b/postman/collections/graviteeio-am-openid-core-collection-app-version.json index ce0df69cbde..b03bbb2e9fe 100644 --- a/postman/collections/graviteeio-am-openid-core-collection-app-version.json +++ b/postman/collections/graviteeio-am-openid-core-collection-app-version.json @@ -104,7 +104,7 @@ ], "body": { "mode": "raw", - "raw": "{\n\t\"name\": \"oidc-core-app-version\", \n\t\"description\": \"test openid connect core specifications\"\n}" + "raw": "{\n\t\"name\": \"oidc-core-app-version\", \n\t\"description\": \"test openid connect core specifications\", \n\t\"dataPlaneId\": \"default\"\n}" }, "url": { "raw": "{{management_url}}/management/organizations/{{defaultOrganizationId}}/environments/{{defaultEnvironmentId}}/domains/", diff --git a/postman/collections/graviteeio-am-openid-core-request-object-collection.json b/postman/collections/graviteeio-am-openid-core-request-object-collection.json index 4415ac3730b..3654a4b0775 100644 --- a/postman/collections/graviteeio-am-openid-core-request-object-collection.json +++ b/postman/collections/graviteeio-am-openid-core-request-object-collection.json @@ -111,7 +111,7 @@ ], "body": { "mode": "raw", - "raw": "{\n\t\"name\": \"request-object\", \n\t\"description\": \"test request object parameters\"\n}" + "raw": "{\n\t\"name\": \"request-object\", \n\t\"description\": \"test request object parameters\", \n\t\"dataPlaneId\": \"default\"\n}" }, "url": { "raw": "{{management_url}}/management/organizations/{{defaultOrganizationId}}/environments/{{defaultEnvironmentId}}/domains/", diff --git a/postman/collections/graviteeio-am-openid-dcr-collection-app-version.json b/postman/collections/graviteeio-am-openid-dcr-collection-app-version.json index d5cef11e002..76a723f9615 100644 --- a/postman/collections/graviteeio-am-openid-dcr-collection-app-version.json +++ b/postman/collections/graviteeio-am-openid-dcr-collection-app-version.json @@ -111,7 +111,7 @@ ], "body": { "mode": "raw", - "raw": "{\n\t\"name\": \"dcr-app-version\", \n\t\"description\": \"test dynamic client registration\"\n}" + "raw": "{\n\t\"name\": \"dcr-app-version\", \n\t\"description\": \"test dynamic client registration\", \n\t\"dataPlaneId\": \"default\"\n}" }, "url": { "raw": "{{management_url}}/management/organizations/{{defaultOrganizationId}}/environments/{{defaultEnvironmentId}}/domains/", diff --git a/postman/collections/graviteeio-am-openid-fapi-collection.json b/postman/collections/graviteeio-am-openid-fapi-collection.json index 0fdae868181..af074fe5921 100644 --- a/postman/collections/graviteeio-am-openid-fapi-collection.json +++ b/postman/collections/graviteeio-am-openid-fapi-collection.json @@ -110,7 +110,7 @@ ], "body": { "mode": "raw", - "raw": "{\n\t\"name\": \"fapi\", \n\t\"description\": \"test fapi parameters\"\n}" + "raw": "{\n\t\"name\": \"fapi\", \n\t\"description\": \"test fapi parameters\", \n\t\"dataPlaneId\": \"default\"\n}" }, "url": { "raw": "{{management_url}}/management/organizations/{{defaultOrganizationId}}/environments/{{defaultEnvironmentId}}/domains/", diff --git a/postman/collections/graviteeio-am-openid-jarm-collection.json b/postman/collections/graviteeio-am-openid-jarm-collection.json index a9a4b2618f4..8a59674ead3 100644 --- a/postman/collections/graviteeio-am-openid-jarm-collection.json +++ b/postman/collections/graviteeio-am-openid-jarm-collection.json @@ -111,7 +111,7 @@ ], "body": { "mode": "raw", - "raw": "{\n\t\"name\": \"jarm\", \n\t\"description\": \"Test OpenID JARM specification\"\n}" + "raw": "{\n\t\"name\": \"jarm\", \n\t\"description\": \"Test OpenID JARM specification\", \n\t\"dataPlaneId\": \"default\"\n}" }, "url": { "raw": "{{management_url}}/management/organizations/{{defaultOrganizationId}}/environments/{{defaultEnvironmentId}}/domains/", diff --git a/postman/collections/graviteeio-am-scim-collection-app-version.json b/postman/collections/graviteeio-am-scim-collection-app-version.json index 1d4d1718035..fea7dc094b1 100644 --- a/postman/collections/graviteeio-am-scim-collection-app-version.json +++ b/postman/collections/graviteeio-am-scim-collection-app-version.json @@ -104,7 +104,7 @@ ], "body": { "mode": "raw", - "raw": "{\n\t\"name\": \"scim-domain-app-version\", \n\t\"description\": \"test System for Cross-domain Identity Management specifications\"\n}" + "raw": "{\n\t\"name\": \"scim-domain-app-version\", \n\t\"description\": \"test System for Cross-domain Identity Management specifications\", \n\t\"dataPlaneId\": \"default\"\n}" }, "url": { "raw": "{{management_url}}/management/organizations/{{defaultOrganizationId}}/environments/{{defaultEnvironmentId}}/domains/", diff --git a/postman/collections/graviteeio-am-scope-management-collection.json b/postman/collections/graviteeio-am-scope-management-collection.json index 25d1923fc2d..4f13b7f464b 100644 --- a/postman/collections/graviteeio-am-scope-management-collection.json +++ b/postman/collections/graviteeio-am-scope-management-collection.json @@ -103,7 +103,7 @@ ], "body": { "mode": "raw", - "raw": "{\n\t\"name\": \"scope\", \n\t\"description\": \"test scope management\"\n}" + "raw": "{\n\t\"name\": \"scope\", \n\t\"description\": \"test scope management\", \n\t\"dataPlaneId\": \"default\"\n}" }, "url": { "raw": "{{management_url}}/management/organizations/{{defaultOrganizationId}}/environments/{{defaultEnvironmentId}}/domains/", diff --git a/postman/collections/graviteeio-am-self-account-management-collection-app-version.json b/postman/collections/graviteeio-am-self-account-management-collection-app-version.json index 973866d87aa..b9a9cd2504a 100644 --- a/postman/collections/graviteeio-am-self-account-management-collection-app-version.json +++ b/postman/collections/graviteeio-am-self-account-management-collection-app-version.json @@ -106,7 +106,7 @@ ], "body": { "mode": "raw", - "raw": "{\n\t\"name\": \"self-account-management-test\", \n\t\"description\": \"test self-account-management impl\"\n}" + "raw": "{\n\t\"name\": \"self-account-management-test\", \n\t\"description\": \"test self-account-management impl\", \n\t\"dataPlaneId\": \"default\"\n}" }, "url": { "raw": "{{management_url}}/management/organizations/{{defaultOrganizationId}}/environments/{{defaultEnvironmentId}}/domains/", diff --git a/postman/collections/graviteeio-am-uma2-app-version-collection.json b/postman/collections/graviteeio-am-uma2-app-version-collection.json index 1ab763a4813..6819cdd2f9b 100644 --- a/postman/collections/graviteeio-am-uma2-app-version-collection.json +++ b/postman/collections/graviteeio-am-uma2-app-version-collection.json @@ -104,7 +104,7 @@ ], "body": { "mode": "raw", - "raw": "{\n\t\"name\": \"uma2_postman\", \n\t\"description\": \"test user-managed access specifications\"\n}" + "raw": "{\n\t\"name\": \"uma2_postman\", \n\t\"description\": \"test user-managed access specifications\", \n\t\"dataPlaneId\": \"default\"\n}" }, "url": { "raw": "{{management_url}}/management/organizations/{{defaultOrganizationId}}/environments/{{defaultEnvironmentId}}/domains/", @@ -6793,4 +6793,4 @@ } } ] -} \ No newline at end of file +} diff --git a/postman/collections/graviteeio-am-user-management-collection-app-version.json b/postman/collections/graviteeio-am-user-management-collection-app-version.json index 8125920f8a7..66234f08a92 100644 --- a/postman/collections/graviteeio-am-user-management-collection-app-version.json +++ b/postman/collections/graviteeio-am-user-management-collection-app-version.json @@ -103,7 +103,7 @@ ], "body": { "mode": "raw", - "raw": "{\n\t\"name\": \"user-domain-app-version\", \n\t\"description\": \"test System for User Management specifications\"\n}" + "raw": "{\n\t\"name\": \"user-domain-app-version\", \n\t\"description\": \"test System for User Management specifications\", \n\t\"dataPlaneId\": \"default\"\n}" }, "url": { "raw": "{{management_url}}/management/organizations/{{defaultOrganizationId}}/environments/{{defaultEnvironmentId}}/domains/", diff --git a/postman/collections/graviteeio-am-vhost-collection.json b/postman/collections/graviteeio-am-vhost-collection.json index 6e84f3f0309..2bdebe81faa 100644 --- a/postman/collections/graviteeio-am-vhost-collection.json +++ b/postman/collections/graviteeio-am-vhost-collection.json @@ -102,7 +102,7 @@ ], "body": { "mode": "raw", - "raw": "{\n\t\"name\": \"vhost\", \n\t\"description\": \"test Virtual Hosts\"\n}" + "raw": "{\n\t\"name\": \"vhost\", \n\t\"description\": \"test Virtual Hosts\", \n\t\"dataPlaneId\": \"default\"\n}" }, "url": { "raw": "{{management_url}}/management/organizations/{{defaultOrganizationId}}/environments/{{defaultEnvironmentId}}/domains/", @@ -255,7 +255,7 @@ ], "body": { "mode": "raw", - "raw": "{\n\t\"name\": \"otherVhost\", \n\t\"description\": \"test Virtual Hosts\"\n}" + "raw": "{\n\t\"name\": \"otherVhost\", \n\t\"description\": \"test Virtual Hosts\", \n\t\"dataPlaneId\": \"default\"\n}" }, "url": { "raw": "{{management_url}}/management/organizations/{{defaultOrganizationId}}/environments/{{defaultEnvironmentId}}/domains/",