diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..51b987a0851ee3a399193b4d297602abea47d80a --- /dev/null +++ b/Dockerfile @@ -0,0 +1,18 @@ +FROM node:12.9.0-alpine as builder +ARG BASE_HREF +RUN mkdir -p /app +WORKDIR /app +COPY package.json /app + + + +RUN npm install +COPY . /app +RUN npm run build -- --prod --aot --base-href $BASE_HREF + + + +FROM nginx +EXPOSE 80 +COPY nginx.conf /etc/nginx/conf.d/default.conf +COPY --from=builder /app/dist /usr/share/nginx/html \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..5551541468b4c72bc767052232ac4ad06303947f --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,55 @@ +version: '3' +services: + urbanite-ui: + image: urbanite/urbanite-ui:latest + build: + context: . + args: + BASE_HREF: / + ports: + - '80:80' + volumes: + - ./src/assets/config.json:/usr/share/nginx/html/assets/config.json + - ./nginx.conf:/etc/nginx/conf.d/default.conf + networks: + - urbanite-network + + keycloak: + image: quay.io/keycloak/keycloak:latest + volumes: + - ./keycloak-realm:/opt/jboss/keycloak/imports + environment: + KEYCLOAK_IMPORT: /opt/jboss/keycloak/imports/realm-export.json -Dkeycloak.profile.feature.upload_scripts=enabled + DB_VENDOR: POSTGRES + DB_ADDR: postgres + DB_DATABASE: keycloak + DB_USER: keycloak + DB_SCHEMA: public + DB_PASSWORD: password + KEYCLOAK_USER: admin + KEYCLOAK_PASSWORD: Pa55w0rd + ports: + - 8080:8080 + depends_on: + - postgres + networks: + - urbanite-network + + postgres: + image: postgres + volumes: + - postgres_data:/var/lib/postgresql/data + environment: + POSTGRES_DB: keycloak + POSTGRES_USER: keycloak + POSTGRES_PASSWORD: password + networks: + - urbanite-network + +volumes: + postgres_data: + driver: local + +networks: + urbanite-network: + driver: bridge \ No newline at end of file diff --git a/keycloak-realm/realm-export.json b/keycloak-realm/realm-export.json new file mode 100644 index 0000000000000000000000000000000000000000..6e92b4252da0e1d30b6f8c7fe7bfcd6b6db2732a --- /dev/null +++ b/keycloak-realm/realm-export.json @@ -0,0 +1,2186 @@ +{ + "id": "urbanite", + "realm": "urbanite", + "displayName": "Urbanite", + "notBefore": 0, + "revokeRefreshToken": false, + "refreshTokenMaxReuse": 0, + "accessTokenLifespan": 300, + "accessTokenLifespanForImplicitFlow": 900, + "ssoSessionIdleTimeout": 1800, + "ssoSessionMaxLifespan": 36000, + "ssoSessionIdleTimeoutRememberMe": 0, + "ssoSessionMaxLifespanRememberMe": 0, + "offlineSessionIdleTimeout": 2592000, + "offlineSessionMaxLifespanEnabled": false, + "offlineSessionMaxLifespan": 5184000, + "clientSessionIdleTimeout": 0, + "clientSessionMaxLifespan": 0, + "clientOfflineSessionIdleTimeout": 0, + "clientOfflineSessionMaxLifespan": 0, + "accessCodeLifespan": 60, + "accessCodeLifespanUserAction": 300, + "accessCodeLifespanLogin": 1800, + "actionTokenGeneratedByAdminLifespan": 43200, + "actionTokenGeneratedByUserLifespan": 300, + "enabled": true, + "sslRequired": "external", + "registrationAllowed": true, + "registrationEmailAsUsername": false, + "rememberMe": false, + "verifyEmail": false, + "loginWithEmailAllowed": true, + "duplicateEmailsAllowed": false, + "resetPasswordAllowed": true, + "editUsernameAllowed": false, + "bruteForceProtected": false, + "permanentLockout": false, + "maxFailureWaitSeconds": 900, + "minimumQuickLoginWaitSeconds": 60, + "waitIncrementSeconds": 60, + "quickLoginCheckMilliSeconds": 1000, + "maxDeltaTimeSeconds": 43200, + "failureFactor": 30, + "roles": { + "realm": [ + { + "id": "36c2f2e6-cbb5-4481-9b63-6f7576665f7a", + "name": "CITIZEN", + "composite": false, + "clientRole": false, + "containerId": "urbanite", + "attributes": {} + }, + { + "id": "4441945b-f68b-4f10-9979-b13ead879a67", + "name": "offline_access", + "description": "${role_offline-access}", + "composite": false, + "clientRole": false, + "containerId": "urbanite", + "attributes": {} + }, + { + "id": "7cbe73a4-85ac-416f-a502-4543150dfbe1", + "name": "MANAGER", + "composite": false, + "clientRole": false, + "containerId": "urbanite", + "attributes": {} + }, + { + "id": "ea427147-f789-41e4-ada1-07abf3b64c11", + "name": "ADMIN", + "composite": false, + "clientRole": false, + "containerId": "urbanite", + "attributes": {} + }, + { + "id": "3a82d135-e6c4-40dc-bf38-727115820303", + "name": "uma_authorization", + "description": "${role_uma_authorization}", + "composite": false, + "clientRole": false, + "containerId": "urbanite", + "attributes": {} + } + ], + "client": { + "realm-management": [ + { + "id": "6cc00ef1-1973-40a7-8ab5-a06602c4ed6f", + "name": "view-events", + "description": "${role_view-events}", + "composite": false, + "clientRole": true, + "containerId": "0e0f82ad-00cf-4e32-8498-e53b76f3d385", + "attributes": {} + }, + { + "id": "23dfce2d-c560-4e7f-a43b-13c37ff9327e", + "name": "manage-clients", + "description": "${role_manage-clients}", + "composite": false, + "clientRole": true, + "containerId": "0e0f82ad-00cf-4e32-8498-e53b76f3d385", + "attributes": {} + }, + { + "id": "e5065e6e-4bc3-4a58-863f-24e61c1a32c1", + "name": "view-identity-providers", + "description": "${role_view-identity-providers}", + "composite": false, + "clientRole": true, + "containerId": "0e0f82ad-00cf-4e32-8498-e53b76f3d385", + "attributes": {} + }, + { + "id": "8ab53b0e-8618-46f6-83a7-585526d8b765", + "name": "query-groups", + "description": "${role_query-groups}", + "composite": false, + "clientRole": true, + "containerId": "0e0f82ad-00cf-4e32-8498-e53b76f3d385", + "attributes": {} + }, + { + "id": "d0dc5e60-8c8c-4af6-8baf-df0d8420a909", + "name": "realm-admin", + "description": "${role_realm-admin}", + "composite": true, + "composites": { + "client": { + "realm-management": [ + "view-events", + "manage-clients", + "view-identity-providers", + "query-groups", + "manage-events", + "view-users", + "create-client", + "impersonation", + "manage-authorization", + "view-authorization", + "view-clients", + "view-realm", + "query-clients", + "manage-identity-providers", + "manage-users", + "query-realms", + "query-users", + "manage-realm" + ] + } + }, + "clientRole": true, + "containerId": "0e0f82ad-00cf-4e32-8498-e53b76f3d385", + "attributes": {} + }, + { + "id": "4e172856-50b8-485c-bdf8-9b5b0b195d40", + "name": "manage-events", + "description": "${role_manage-events}", + "composite": false, + "clientRole": true, + "containerId": "0e0f82ad-00cf-4e32-8498-e53b76f3d385", + "attributes": {} + }, + { + "id": "ef4cd767-e7e5-41be-877d-ef0d5e8e1690", + "name": "view-users", + "description": "${role_view-users}", + "composite": true, + "composites": { + "client": { + "realm-management": [ + "query-groups", + "query-users" + ] + } + }, + "clientRole": true, + "containerId": "0e0f82ad-00cf-4e32-8498-e53b76f3d385", + "attributes": {} + }, + { + "id": "49c91288-d775-426d-a85d-30f24ff932fd", + "name": "create-client", + "description": "${role_create-client}", + "composite": false, + "clientRole": true, + "containerId": "0e0f82ad-00cf-4e32-8498-e53b76f3d385", + "attributes": {} + }, + { + "id": "7640f3d5-1bce-4e01-bac3-aa54c011e9a0", + "name": "impersonation", + "description": "${role_impersonation}", + "composite": false, + "clientRole": true, + "containerId": "0e0f82ad-00cf-4e32-8498-e53b76f3d385", + "attributes": {} + }, + { + "id": "b1969e45-cfef-44f3-95bc-1b68aa7ef24d", + "name": "manage-authorization", + "description": "${role_manage-authorization}", + "composite": false, + "clientRole": true, + "containerId": "0e0f82ad-00cf-4e32-8498-e53b76f3d385", + "attributes": {} + }, + { + "id": "330ade52-bbb3-4d0a-a125-035b0be062fc", + "name": "view-authorization", + "description": "${role_view-authorization}", + "composite": false, + "clientRole": true, + "containerId": "0e0f82ad-00cf-4e32-8498-e53b76f3d385", + "attributes": {} + }, + { + "id": "3db7e914-6253-4ff7-94a5-11b33567334d", + "name": "view-clients", + "description": "${role_view-clients}", + "composite": true, + "composites": { + "client": { + "realm-management": [ + "query-clients" + ] + } + }, + "clientRole": true, + "containerId": "0e0f82ad-00cf-4e32-8498-e53b76f3d385", + "attributes": {} + }, + { + "id": "0f1c7fdc-e527-4408-961d-f6c047bed196", + "name": "view-realm", + "description": "${role_view-realm}", + "composite": false, + "clientRole": true, + "containerId": "0e0f82ad-00cf-4e32-8498-e53b76f3d385", + "attributes": {} + }, + { + "id": "d5b3cda2-70b0-40fe-ae6d-41ad8605cc27", + "name": "query-clients", + "description": "${role_query-clients}", + "composite": false, + "clientRole": true, + "containerId": "0e0f82ad-00cf-4e32-8498-e53b76f3d385", + "attributes": {} + }, + { + "id": "adbcb9e2-849c-471d-846f-31acbc72c6f7", + "name": "manage-identity-providers", + "description": "${role_manage-identity-providers}", + "composite": false, + "clientRole": true, + "containerId": "0e0f82ad-00cf-4e32-8498-e53b76f3d385", + "attributes": {} + }, + { + "id": "97358218-891c-470b-ab47-8c2727c39a63", + "name": "manage-users", + "description": "${role_manage-users}", + "composite": false, + "clientRole": true, + "containerId": "0e0f82ad-00cf-4e32-8498-e53b76f3d385", + "attributes": {} + }, + { + "id": "064a6aec-ceff-4119-8f06-3397640ec097", + "name": "query-realms", + "description": "${role_query-realms}", + "composite": false, + "clientRole": true, + "containerId": "0e0f82ad-00cf-4e32-8498-e53b76f3d385", + "attributes": {} + }, + { + "id": "7fd05f00-2333-44d2-99a7-099ea0f48afb", + "name": "query-users", + "description": "${role_query-users}", + "composite": false, + "clientRole": true, + "containerId": "0e0f82ad-00cf-4e32-8498-e53b76f3d385", + "attributes": {} + }, + { + "id": "e5642be8-fa86-4d20-8413-464a0bf90063", + "name": "manage-realm", + "description": "${role_manage-realm}", + "composite": false, + "clientRole": true, + "containerId": "0e0f82ad-00cf-4e32-8498-e53b76f3d385", + "attributes": {} + } + ], + "security-admin-console": [], + "admin-cli": [], + "account-console": [], + "idra": [ + { + "id": "6d7115f5-f360-4e1c-a073-eee076ef68c4", + "name": "ADMIN", + "composite": true, + "composites": { + "realm": [ + "ADMIN" + ], + "client": { + "idra": [ + "ADMIN" + ] + } + }, + "clientRole": true, + "containerId": "544cdd65-3002-48f3-80a5-15512febde02", + "attributes": {} + } + ], + "broker": [ + { + "id": "154def2a-dbdf-4555-8501-66912fbd1207", + "name": "read-token", + "description": "${role_read-token}", + "composite": false, + "clientRole": true, + "containerId": "4e175c53-8e7b-46c3-b6c8-efff2f268e3f", + "attributes": {} + } + ], + "urbanite": [], + "account": [ + { + "id": "2b9a7f13-3c0d-4afc-b841-50ce311a5b1b", + "name": "manage-account-links", + "description": "${role_manage-account-links}", + "composite": false, + "clientRole": true, + "containerId": "4edab62f-6748-4b55-bd4e-8669c51227b1", + "attributes": {} + }, + { + "id": "561397b9-3cea-4b26-813a-1d3b2dee5eab", + "name": "view-profile", + "description": "${role_view-profile}", + "composite": false, + "clientRole": true, + "containerId": "4edab62f-6748-4b55-bd4e-8669c51227b1", + "attributes": {} + }, + { + "id": "8186ac92-ff70-492b-94a4-a7f62a7ea9de", + "name": "manage-account", + "description": "${role_manage-account}", + "composite": true, + "composites": { + "client": { + "account": [ + "manage-account-links" + ] + } + }, + "clientRole": true, + "containerId": "4edab62f-6748-4b55-bd4e-8669c51227b1", + "attributes": {} + }, + { + "id": "5a6162a3-2cc8-48ab-8448-1eb772ef59d9", + "name": "view-applications", + "description": "${role_view-applications}", + "composite": false, + "clientRole": true, + "containerId": "4edab62f-6748-4b55-bd4e-8669c51227b1", + "attributes": {} + }, + { + "id": "5579821f-cf49-4c87-bbac-17e5cb252d3b", + "name": "delete-account", + "description": "${role_delete-account}", + "composite": false, + "clientRole": true, + "containerId": "4edab62f-6748-4b55-bd4e-8669c51227b1", + "attributes": {} + }, + { + "id": "6be2af5c-7613-4a9a-b720-8c4df674a16d", + "name": "view-consent", + "description": "${role_view-consent}", + "composite": false, + "clientRole": true, + "containerId": "4edab62f-6748-4b55-bd4e-8669c51227b1", + "attributes": {} + }, + { + "id": "8a4ad929-981f-4023-a79f-299083b623b2", + "name": "manage-consent", + "description": "${role_manage-consent}", + "composite": true, + "composites": { + "client": { + "account": [ + "view-consent" + ] + } + }, + "clientRole": true, + "containerId": "4edab62f-6748-4b55-bd4e-8669c51227b1", + "attributes": {} + } + ] + } + }, + "groups": [], + "defaultRoles": [ + "offline_access", + "uma_authorization" + ], + "requiredCredentials": [ + "password" + ], + "otpPolicyType": "totp", + "otpPolicyAlgorithm": "HmacSHA1", + "otpPolicyInitialCounter": 0, + "otpPolicyDigits": 6, + "otpPolicyLookAheadWindow": 1, + "otpPolicyPeriod": 30, + "otpSupportedApplications": [ + "FreeOTP", + "Google Authenticator" + ], + "webAuthnPolicyRpEntityName": "keycloak", + "webAuthnPolicySignatureAlgorithms": [ + "ES256" + ], + "webAuthnPolicyRpId": "", + "webAuthnPolicyAttestationConveyancePreference": "not specified", + "webAuthnPolicyAuthenticatorAttachment": "not specified", + "webAuthnPolicyRequireResidentKey": "not specified", + "webAuthnPolicyUserVerificationRequirement": "not specified", + "webAuthnPolicyCreateTimeout": 0, + "webAuthnPolicyAvoidSameAuthenticatorRegister": false, + "webAuthnPolicyAcceptableAaguids": [], + "webAuthnPolicyPasswordlessRpEntityName": "keycloak", + "webAuthnPolicyPasswordlessSignatureAlgorithms": [ + "ES256" + ], + "webAuthnPolicyPasswordlessRpId": "", + "webAuthnPolicyPasswordlessAttestationConveyancePreference": "not specified", + "webAuthnPolicyPasswordlessAuthenticatorAttachment": "not specified", + "webAuthnPolicyPasswordlessRequireResidentKey": "not specified", + "webAuthnPolicyPasswordlessUserVerificationRequirement": "not specified", + "webAuthnPolicyPasswordlessCreateTimeout": 0, + "webAuthnPolicyPasswordlessAvoidSameAuthenticatorRegister": false, + "webAuthnPolicyPasswordlessAcceptableAaguids": [], + "scopeMappings": [ + { + "clientScope": "offline_access", + "roles": [ + "offline_access" + ] + } + ], + "clientScopeMappings": { + "account": [ + { + "client": "account-console", + "roles": [ + "manage-account" + ] + } + ] + }, + "clients": [ + { + "id": "4edab62f-6748-4b55-bd4e-8669c51227b1", + "clientId": "account", + "name": "${client_account}", + "rootUrl": "${authBaseUrl}", + "baseUrl": "/realms/urbanite/account/", + "surrogateAuthRequired": false, + "enabled": true, + "alwaysDisplayInConsole": false, + "clientAuthenticatorType": "client-secret", + "secret": "**********", + "defaultRoles": [ + "view-profile", + "manage-account" + ], + "redirectUris": [ + "/realms/urbanite/account/*" + ], + "webOrigins": [], + "notBefore": 0, + "bearerOnly": false, + "consentRequired": false, + "standardFlowEnabled": true, + "implicitFlowEnabled": false, + "directAccessGrantsEnabled": false, + "serviceAccountsEnabled": false, + "publicClient": false, + "frontchannelLogout": false, + "protocol": "openid-connect", + "attributes": {}, + "authenticationFlowBindingOverrides": {}, + "fullScopeAllowed": false, + "nodeReRegistrationTimeout": 0, + "defaultClientScopes": [ + "web-origins", + "role_list", + "profile", + "roles", + "email" + ], + "optionalClientScopes": [ + "address", + "phone", + "offline_access", + "microprofile-jwt" + ] + }, + { + "id": "ab60b3c2-7a86-4929-96c5-13df9dbfaa09", + "clientId": "account-console", + "name": "${client_account-console}", + "rootUrl": "${authBaseUrl}", + "baseUrl": "/realms/urbanite/account/", + "surrogateAuthRequired": false, + "enabled": true, + "alwaysDisplayInConsole": false, + "clientAuthenticatorType": "client-secret", + "secret": "**********", + "redirectUris": [ + "/realms/urbanite/account/*" + ], + "webOrigins": [], + "notBefore": 0, + "bearerOnly": false, + "consentRequired": false, + "standardFlowEnabled": true, + "implicitFlowEnabled": false, + "directAccessGrantsEnabled": false, + "serviceAccountsEnabled": false, + "publicClient": true, + "frontchannelLogout": false, + "protocol": "openid-connect", + "attributes": { + "pkce.code.challenge.method": "S256" + }, + "authenticationFlowBindingOverrides": {}, + "fullScopeAllowed": false, + "nodeReRegistrationTimeout": 0, + "protocolMappers": [ + { + "id": "904a02ed-ced0-447c-a826-008972093db7", + "name": "audience resolve", + "protocol": "openid-connect", + "protocolMapper": "oidc-audience-resolve-mapper", + "consentRequired": false, + "config": {} + } + ], + "defaultClientScopes": [ + "web-origins", + "role_list", + "profile", + "roles", + "email" + ], + "optionalClientScopes": [ + "address", + "phone", + "offline_access", + "microprofile-jwt" + ] + }, + { + "id": "6571a5c9-2802-48b6-8f12-91c20a0ae7ef", + "clientId": "admin-cli", + "name": "${client_admin-cli}", + "surrogateAuthRequired": false, + "enabled": true, + "alwaysDisplayInConsole": false, + "clientAuthenticatorType": "client-secret", + "secret": "**********", + "redirectUris": [], + "webOrigins": [], + "notBefore": 0, + "bearerOnly": false, + "consentRequired": false, + "standardFlowEnabled": false, + "implicitFlowEnabled": false, + "directAccessGrantsEnabled": true, + "serviceAccountsEnabled": false, + "publicClient": true, + "frontchannelLogout": false, + "protocol": "openid-connect", + "attributes": {}, + "authenticationFlowBindingOverrides": {}, + "fullScopeAllowed": false, + "nodeReRegistrationTimeout": 0, + "defaultClientScopes": [ + "web-origins", + "role_list", + "profile", + "roles", + "email" + ], + "optionalClientScopes": [ + "address", + "phone", + "offline_access", + "microprofile-jwt" + ] + }, + { + "id": "4e175c53-8e7b-46c3-b6c8-efff2f268e3f", + "clientId": "broker", + "name": "${client_broker}", + "surrogateAuthRequired": false, + "enabled": true, + "alwaysDisplayInConsole": false, + "clientAuthenticatorType": "client-secret", + "secret": "**********", + "redirectUris": [], + "webOrigins": [], + "notBefore": 0, + "bearerOnly": false, + "consentRequired": false, + "standardFlowEnabled": true, + "implicitFlowEnabled": false, + "directAccessGrantsEnabled": false, + "serviceAccountsEnabled": false, + "publicClient": false, + "frontchannelLogout": false, + "protocol": "openid-connect", + "attributes": {}, + "authenticationFlowBindingOverrides": {}, + "fullScopeAllowed": false, + "nodeReRegistrationTimeout": 0, + "defaultClientScopes": [ + "web-origins", + "role_list", + "profile", + "roles", + "email" + ], + "optionalClientScopes": [ + "address", + "phone", + "offline_access", + "microprofile-jwt" + ] + }, + { + "id": "544cdd65-3002-48f3-80a5-15512febde02", + "clientId": "idra", + "rootUrl": "http://localhost:8080", + "adminUrl": "http://localhost:8080", + "surrogateAuthRequired": false, + "enabled": true, + "alwaysDisplayInConsole": false, + "clientAuthenticatorType": "client-secret", + "secret": "**********", + "redirectUris": [ + "http://localhost:8080/Idra/api/v1/administration/login" + ], + "webOrigins": [ + "http://localhost:8080" + ], + "notBefore": 0, + "bearerOnly": false, + "consentRequired": false, + "standardFlowEnabled": true, + "implicitFlowEnabled": false, + "directAccessGrantsEnabled": true, + "serviceAccountsEnabled": false, + "publicClient": false, + "frontchannelLogout": false, + "protocol": "openid-connect", + "attributes": { + "saml.assertion.signature": "false", + "saml.force.post.binding": "false", + "saml.multivalued.roles": "false", + "saml.encrypt": "false", + "backchannel.logout.revoke.offline.tokens": "false", + "saml.server.signature": "false", + "saml.server.signature.keyinfo.ext": "false", + "exclude.session.state.from.auth.response": "false", + "backchannel.logout.session.required": "true", + "backchannel.logout.url": "http://localhost:8080", + "client_credentials.use_refresh_token": "false", + "saml_force_name_id_format": "false", + "saml.client.signature": "false", + "tls.client.certificate.bound.access.tokens": "false", + "saml.authnstatement": "false", + "display.on.consent.screen": "false", + "saml.onetimeuse.condition": "false" + }, + "authenticationFlowBindingOverrides": {}, + "fullScopeAllowed": true, + "nodeReRegistrationTimeout": -1, + "defaultClientScopes": [ + "web-origins", + "role_list", + "profile", + "roles", + "email" + ], + "optionalClientScopes": [ + "address", + "phone", + "offline_access", + "microprofile-jwt" + ] + }, + { + "id": "0e0f82ad-00cf-4e32-8498-e53b76f3d385", + "clientId": "realm-management", + "name": "${client_realm-management}", + "surrogateAuthRequired": false, + "enabled": true, + "alwaysDisplayInConsole": false, + "clientAuthenticatorType": "client-secret", + "secret": "**********", + "redirectUris": [], + "webOrigins": [], + "notBefore": 0, + "bearerOnly": true, + "consentRequired": false, + "standardFlowEnabled": true, + "implicitFlowEnabled": false, + "directAccessGrantsEnabled": false, + "serviceAccountsEnabled": false, + "publicClient": false, + "frontchannelLogout": false, + "protocol": "openid-connect", + "attributes": {}, + "authenticationFlowBindingOverrides": {}, + "fullScopeAllowed": false, + "nodeReRegistrationTimeout": 0, + "defaultClientScopes": [ + "web-origins", + "role_list", + "profile", + "roles", + "email" + ], + "optionalClientScopes": [ + "address", + "phone", + "offline_access", + "microprofile-jwt" + ] + }, + { + "id": "5c5310a8-8335-4e91-965d-189372a5bb2c", + "clientId": "security-admin-console", + "name": "${client_security-admin-console}", + "rootUrl": "${authAdminUrl}", + "baseUrl": "/admin/urbanite/console/", + "surrogateAuthRequired": false, + "enabled": true, + "alwaysDisplayInConsole": false, + "clientAuthenticatorType": "client-secret", + "secret": "**********", + "redirectUris": [ + "/admin/urbanite/console/*" + ], + "webOrigins": [ + "+" + ], + "notBefore": 0, + "bearerOnly": false, + "consentRequired": false, + "standardFlowEnabled": true, + "implicitFlowEnabled": false, + "directAccessGrantsEnabled": false, + "serviceAccountsEnabled": false, + "publicClient": true, + "frontchannelLogout": false, + "protocol": "openid-connect", + "attributes": { + "pkce.code.challenge.method": "S256" + }, + "authenticationFlowBindingOverrides": {}, + "fullScopeAllowed": false, + "nodeReRegistrationTimeout": 0, + "protocolMappers": [ + { + "id": "9398333e-afa4-4a99-b686-3569fbb1a3a9", + "name": "locale", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-attribute-mapper", + "consentRequired": false, + "config": { + "userinfo.token.claim": "true", + "user.attribute": "locale", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "locale", + "jsonType.label": "String" + } + } + ], + "defaultClientScopes": [ + "web-origins", + "role_list", + "profile", + "roles", + "email" + ], + "optionalClientScopes": [ + "address", + "phone", + "offline_access", + "microprofile-jwt" + ] + }, + { + "id": "51e3a2e0-1ccc-4290-a05f-0804740a41c8", + "clientId": "urbanite", + "rootUrl": "", + "adminUrl": "", + "baseUrl": "", + "surrogateAuthRequired": false, + "enabled": true, + "alwaysDisplayInConsole": false, + "clientAuthenticatorType": "client-secret", + "secret": "**********", + "redirectUris": [ + "*" + ], + "webOrigins": [ + "*" + ], + "notBefore": 0, + "bearerOnly": false, + "consentRequired": false, + "standardFlowEnabled": true, + "implicitFlowEnabled": false, + "directAccessGrantsEnabled": true, + "serviceAccountsEnabled": false, + "publicClient": true, + "frontchannelLogout": false, + "protocol": "openid-connect", + "attributes": { + "saml.assertion.signature": "false", + "saml.force.post.binding": "false", + "saml.multivalued.roles": "false", + "saml.encrypt": "false", + "backchannel.logout.revoke.offline.tokens": "false", + "saml.server.signature": "false", + "saml.server.signature.keyinfo.ext": "false", + "exclude.session.state.from.auth.response": "false", + "backchannel.logout.session.required": "true", + "client_credentials.use_refresh_token": "false", + "saml_force_name_id_format": "false", + "saml.client.signature": "false", + "tls.client.certificate.bound.access.tokens": "false", + "saml.authnstatement": "false", + "display.on.consent.screen": "false", + "saml.onetimeuse.condition": "false" + }, + "authenticationFlowBindingOverrides": {}, + "fullScopeAllowed": true, + "nodeReRegistrationTimeout": -1, + "defaultClientScopes": [ + "web-origins", + "role_list", + "profile", + "roles", + "email" + ], + "optionalClientScopes": [ + "address", + "phone", + "offline_access", + "microprofile-jwt" + ] + } + ], + "clientScopes": [ + { + "id": "35824552-9ea8-4f17-941b-7ac98bbc4ee6", + "name": "offline_access", + "description": "OpenID Connect built-in scope: offline_access", + "protocol": "openid-connect", + "attributes": { + "consent.screen.text": "${offlineAccessScopeConsentText}", + "display.on.consent.screen": "true" + } + }, + { + "id": "f1f51891-daa5-42e4-856a-dc37edcacdf4", + "name": "role_list", + "description": "SAML role list", + "protocol": "saml", + "attributes": { + "consent.screen.text": "${samlRoleListScopeConsentText}", + "display.on.consent.screen": "true" + }, + "protocolMappers": [ + { + "id": "e2c878b9-1d78-4666-93f2-62f6e1e31cfc", + "name": "role list", + "protocol": "saml", + "protocolMapper": "saml-role-list-mapper", + "consentRequired": false, + "config": { + "single": "false", + "attribute.nameformat": "Basic", + "attribute.name": "Role" + } + } + ] + }, + { + "id": "7b4c2c14-10fc-422c-be8e-97d1fe14ff0f", + "name": "profile", + "description": "OpenID Connect built-in scope: profile", + "protocol": "openid-connect", + "attributes": { + "include.in.token.scope": "true", + "display.on.consent.screen": "true", + "consent.screen.text": "${profileScopeConsentText}" + }, + "protocolMappers": [ + { + "id": "859f9d14-73fd-43b8-b75c-70989350c746", + "name": "website", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-attribute-mapper", + "consentRequired": false, + "config": { + "userinfo.token.claim": "true", + "user.attribute": "website", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "website", + "jsonType.label": "String" + } + }, + { + "id": "88dd06ae-b3d7-41e1-a5cb-9cd8383ba6dd", + "name": "gender", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-attribute-mapper", + "consentRequired": false, + "config": { + "userinfo.token.claim": "true", + "user.attribute": "gender", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "gender", + "jsonType.label": "String" + } + }, + { + "id": "fc0b76f4-38b4-4005-b80e-8907e19d22aa", + "name": "family name", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-property-mapper", + "consentRequired": false, + "config": { + "userinfo.token.claim": "true", + "user.attribute": "lastName", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "family_name", + "jsonType.label": "String" + } + }, + { + "id": "f41dcb7e-ced6-450a-ac0e-ea87c5d317bb", + "name": "profile", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-attribute-mapper", + "consentRequired": false, + "config": { + "userinfo.token.claim": "true", + "user.attribute": "profile", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "profile", + "jsonType.label": "String" + } + }, + { + "id": "98f03fde-744e-4845-9b2f-a513733ef84e", + "name": "nickname", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-attribute-mapper", + "consentRequired": false, + "config": { + "userinfo.token.claim": "true", + "user.attribute": "nickname", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "nickname", + "jsonType.label": "String" + } + }, + { + "id": "2158f4e7-1789-460a-b4e6-2aafaae8e3e6", + "name": "username", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-property-mapper", + "consentRequired": false, + "config": { + "userinfo.token.claim": "true", + "user.attribute": "username", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "preferred_username", + "jsonType.label": "String" + } + }, + { + "id": "84af33eb-bd19-4e78-b1c4-c843c0e01b1f", + "name": "birthdate", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-attribute-mapper", + "consentRequired": false, + "config": { + "userinfo.token.claim": "true", + "user.attribute": "birthdate", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "birthdate", + "jsonType.label": "String" + } + }, + { + "id": "b94ffbd2-c009-40df-849d-7c8e10d28fa7", + "name": "updated at", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-attribute-mapper", + "consentRequired": false, + "config": { + "userinfo.token.claim": "true", + "user.attribute": "updatedAt", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "updated_at", + "jsonType.label": "String" + } + }, + { + "id": "72ec6733-f980-4f8a-9009-aa83bbe9e8ff", + "name": "middle name", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-attribute-mapper", + "consentRequired": false, + "config": { + "userinfo.token.claim": "true", + "user.attribute": "middleName", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "middle_name", + "jsonType.label": "String" + } + }, + { + "id": "91032f9d-2691-4fdd-8ee5-5e74fa96762f", + "name": "zoneinfo", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-attribute-mapper", + "consentRequired": false, + "config": { + "userinfo.token.claim": "true", + "user.attribute": "zoneinfo", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "zoneinfo", + "jsonType.label": "String" + } + }, + { + "id": "9aef504a-09b9-49e5-9a8f-6f6344c0216f", + "name": "picture", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-attribute-mapper", + "consentRequired": false, + "config": { + "userinfo.token.claim": "true", + "user.attribute": "picture", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "picture", + "jsonType.label": "String" + } + }, + { + "id": "012fdbf1-a48a-4696-9588-cdfb3c601874", + "name": "full name", + "protocol": "openid-connect", + "protocolMapper": "oidc-full-name-mapper", + "consentRequired": false, + "config": { + "id.token.claim": "true", + "access.token.claim": "true", + "userinfo.token.claim": "true" + } + }, + { + "id": "c55a69f9-3c34-44ab-8c4f-f432ac1cd46d", + "name": "given name", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-property-mapper", + "consentRequired": false, + "config": { + "userinfo.token.claim": "true", + "user.attribute": "firstName", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "given_name", + "jsonType.label": "String" + } + }, + { + "id": "03ddc6ad-5759-4171-b3dc-2a9e21b8d4a4", + "name": "locale", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-attribute-mapper", + "consentRequired": false, + "config": { + "userinfo.token.claim": "true", + "user.attribute": "locale", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "locale", + "jsonType.label": "String" + } + } + ] + }, + { + "id": "b966e495-7a77-4980-9d71-29a8a1b60b4e", + "name": "email", + "description": "OpenID Connect built-in scope: email", + "protocol": "openid-connect", + "attributes": { + "include.in.token.scope": "true", + "display.on.consent.screen": "true", + "consent.screen.text": "${emailScopeConsentText}" + }, + "protocolMappers": [ + { + "id": "9128fad8-7b86-4a8c-9cbb-8f8a8c78d0bf", + "name": "email", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-property-mapper", + "consentRequired": false, + "config": { + "userinfo.token.claim": "true", + "user.attribute": "email", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "email", + "jsonType.label": "String" + } + }, + { + "id": "d3f63b8c-4537-4611-b98c-79d745a1e209", + "name": "email verified", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-property-mapper", + "consentRequired": false, + "config": { + "userinfo.token.claim": "true", + "user.attribute": "emailVerified", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "email_verified", + "jsonType.label": "boolean" + } + } + ] + }, + { + "id": "7f4cfa2b-a279-4313-a8bf-fdcf6bb1b6ad", + "name": "address", + "description": "OpenID Connect built-in scope: address", + "protocol": "openid-connect", + "attributes": { + "include.in.token.scope": "true", + "display.on.consent.screen": "true", + "consent.screen.text": "${addressScopeConsentText}" + }, + "protocolMappers": [ + { + "id": "d2a4af86-a04d-4be7-b3bb-6de48f6d2187", + "name": "address", + "protocol": "openid-connect", + "protocolMapper": "oidc-address-mapper", + "consentRequired": false, + "config": { + "user.attribute.formatted": "formatted", + "user.attribute.country": "country", + "user.attribute.postal_code": "postal_code", + "userinfo.token.claim": "true", + "user.attribute.street": "street", + "id.token.claim": "true", + "user.attribute.region": "region", + "access.token.claim": "true", + "user.attribute.locality": "locality" + } + } + ] + }, + { + "id": "952007b2-4a10-4119-b4be-3703b7e60344", + "name": "phone", + "description": "OpenID Connect built-in scope: phone", + "protocol": "openid-connect", + "attributes": { + "include.in.token.scope": "true", + "display.on.consent.screen": "true", + "consent.screen.text": "${phoneScopeConsentText}" + }, + "protocolMappers": [ + { + "id": "09cf84d7-7044-43f0-873b-cc73ca02be8e", + "name": "phone number", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-attribute-mapper", + "consentRequired": false, + "config": { + "userinfo.token.claim": "true", + "user.attribute": "phoneNumber", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "phone_number", + "jsonType.label": "String" + } + }, + { + "id": "f619adc0-db72-4e16-bd90-9ea03729bfe4", + "name": "phone number verified", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-attribute-mapper", + "consentRequired": false, + "config": { + "userinfo.token.claim": "true", + "user.attribute": "phoneNumberVerified", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "phone_number_verified", + "jsonType.label": "boolean" + } + } + ] + }, + { + "id": "d8353db3-18f8-4dc6-8be8-0584221914a4", + "name": "roles", + "description": "OpenID Connect scope for add user roles to the access token", + "protocol": "openid-connect", + "attributes": { + "include.in.token.scope": "true", + "display.on.consent.screen": "true", + "consent.screen.text": "${rolesScopeConsentText}" + }, + "protocolMappers": [ + { + "id": "9b83f4db-56c2-4c60-955d-3311bba2fa6b", + "name": "audience resolve", + "protocol": "openid-connect", + "protocolMapper": "oidc-audience-resolve-mapper", + "consentRequired": false, + "config": {} + }, + { + "id": "a9307a9e-1f4b-4abe-b2da-1bc910fe2ae6", + "name": "client roles", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-client-role-mapper", + "consentRequired": false, + "config": { + "multivalued": "true", + "userinfo.token.claim": "false", + "user.attribute": "foo", + "access.token.claim": "true", + "claim.name": "resource_access.${client_id}.roles", + "jsonType.label": "String", + "usermodel.clientRoleMapping.clientId": "idra" + } + }, + { + "id": "1d1b9aef-9f68-41d2-9b21-df6799d18723", + "name": "realm roles", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-realm-role-mapper", + "consentRequired": false, + "config": { + "multivalued": "true", + "userinfo.token.claim": "true", + "user.attribute": "foo", + "access.token.claim": "true", + "claim.name": "roles", + "jsonType.label": "String" + } + } + ] + }, + { + "id": "869bc079-ebf8-4841-b3bc-fd4db6a2b65e", + "name": "web-origins", + "description": "OpenID Connect scope for add allowed web origins to the access token", + "protocol": "openid-connect", + "attributes": { + "include.in.token.scope": "false", + "display.on.consent.screen": "false", + "consent.screen.text": "" + }, + "protocolMappers": [ + { + "id": "122b2081-5bbf-4279-83c4-6339eb49879f", + "name": "allowed web origins", + "protocol": "openid-connect", + "protocolMapper": "oidc-allowed-origins-mapper", + "consentRequired": false, + "config": {} + } + ] + }, + { + "id": "fb82c457-9bb5-4b0a-b4c7-8746e841e59a", + "name": "microprofile-jwt", + "description": "Microprofile - JWT built-in scope", + "protocol": "openid-connect", + "attributes": { + "include.in.token.scope": "true", + "display.on.consent.screen": "false" + }, + "protocolMappers": [ + { + "id": "36de9e70-20ab-4322-863f-2b4f4b0bf38a", + "name": "upn", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-property-mapper", + "consentRequired": false, + "config": { + "userinfo.token.claim": "true", + "user.attribute": "username", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "upn", + "jsonType.label": "String" + } + }, + { + "id": "0939bb8f-d474-4e3d-9806-9ea387b5e8bb", + "name": "groups", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-realm-role-mapper", + "consentRequired": false, + "config": { + "multivalued": "true", + "userinfo.token.claim": "true", + "user.attribute": "foo", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "groups", + "jsonType.label": "String" + } + } + ] + } + ], + "defaultDefaultClientScopes": [ + "role_list", + "profile", + "email", + "roles", + "web-origins" + ], + "defaultOptionalClientScopes": [ + "offline_access", + "address", + "phone", + "microprofile-jwt" + ], + "browserSecurityHeaders": { + "contentSecurityPolicyReportOnly": "", + "xContentTypeOptions": "nosniff", + "xRobotsTag": "none", + "xFrameOptions": "SAMEORIGIN", + "contentSecurityPolicy": "frame-src 'self'; frame-ancestors 'self'; object-src 'none';", + "xXSSProtection": "1; mode=block", + "strictTransportSecurity": "max-age=31536000; includeSubDomains" + }, + "smtpServer": {}, + "eventsEnabled": false, + "eventsListeners": [ + "jboss-logging" + ], + "enabledEventTypes": [], + "adminEventsEnabled": false, + "adminEventsDetailsEnabled": false, + "identityProviders": [], + "identityProviderMappers": [], + "components": { + "org.keycloak.services.clientregistration.policy.ClientRegistrationPolicy": [ + { + "id": "8023ffa5-ec34-439f-bc53-cf3622b77492", + "name": "Max Clients Limit", + "providerId": "max-clients", + "subType": "anonymous", + "subComponents": {}, + "config": { + "max-clients": [ + "200" + ] + } + }, + { + "id": "9ebd740f-ab0f-42fa-ba34-31746dd2dd3d", + "name": "Allowed Client Scopes", + "providerId": "allowed-client-templates", + "subType": "anonymous", + "subComponents": {}, + "config": { + "allow-default-scopes": [ + "true" + ] + } + }, + { + "id": "76bb07b5-a805-40bf-a396-1df0d1346365", + "name": "Allowed Client Scopes", + "providerId": "allowed-client-templates", + "subType": "authenticated", + "subComponents": {}, + "config": { + "allow-default-scopes": [ + "true" + ] + } + }, + { + "id": "c58bc59d-9ebf-4772-8a0a-6e0cb9dc5581", + "name": "Allowed Protocol Mapper Types", + "providerId": "allowed-protocol-mappers", + "subType": "authenticated", + "subComponents": {}, + "config": { + "allowed-protocol-mapper-types": [ + "oidc-usermodel-attribute-mapper", + "oidc-sha256-pairwise-sub-mapper", + "oidc-usermodel-property-mapper", + "oidc-address-mapper", + "saml-user-attribute-mapper", + "oidc-full-name-mapper", + "saml-role-list-mapper", + "saml-user-property-mapper" + ] + } + }, + { + "id": "8bb6b524-ca19-4d99-9ae4-9e5a021300b3", + "name": "Allowed Protocol Mapper Types", + "providerId": "allowed-protocol-mappers", + "subType": "anonymous", + "subComponents": {}, + "config": { + "allowed-protocol-mapper-types": [ + "oidc-full-name-mapper", + "oidc-sha256-pairwise-sub-mapper", + "saml-user-property-mapper", + "oidc-usermodel-attribute-mapper", + "saml-role-list-mapper", + "saml-user-attribute-mapper", + "oidc-address-mapper", + "oidc-usermodel-property-mapper" + ] + } + }, + { + "id": "c39db4f7-1655-4d64-aeb5-1b796244d52c", + "name": "Trusted Hosts", + "providerId": "trusted-hosts", + "subType": "anonymous", + "subComponents": {}, + "config": { + "host-sending-registration-request-must-match": [ + "true" + ], + "client-uris-must-match": [ + "true" + ] + } + }, + { + "id": "36cd5c03-9d0f-42a1-9dda-c739ab2604a6", + "name": "Consent Required", + "providerId": "consent-required", + "subType": "anonymous", + "subComponents": {}, + "config": {} + }, + { + "id": "f16997f6-1fdd-4ab7-b7cc-87b826412098", + "name": "Full Scope Disabled", + "providerId": "scope", + "subType": "anonymous", + "subComponents": {}, + "config": {} + } + ], + "org.keycloak.keys.KeyProvider": [ + { + "id": "aeb17412-8f6a-4875-8718-9c436f754851", + "name": "rsa-generated", + "providerId": "rsa-generated", + "subComponents": {}, + "config": { + "priority": [ + "100" + ] + } + }, + { + "id": "ca34d454-04f8-4155-bec3-3ee7c57fac7d", + "name": "aes-generated", + "providerId": "aes-generated", + "subComponents": {}, + "config": { + "priority": [ + "100" + ] + } + }, + { + "id": "579745f9-4fa7-492a-908c-2ca8c61ec1c8", + "name": "hmac-generated", + "providerId": "hmac-generated", + "subComponents": {}, + "config": { + "priority": [ + "100" + ], + "algorithm": [ + "HS256" + ] + } + } + ] + }, + "internationalizationEnabled": false, + "supportedLocales": [], + "authenticationFlows": [ + { + "id": "0011f81f-3e89-4e03-8df7-112d37f84474", + "alias": "Account verification options", + "description": "Method with which to verity the existing account", + "providerId": "basic-flow", + "topLevel": false, + "builtIn": true, + "authenticationExecutions": [ + { + "authenticator": "idp-email-verification", + "requirement": "ALTERNATIVE", + "priority": 10, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "requirement": "ALTERNATIVE", + "priority": 20, + "flowAlias": "Verify Existing Account by Re-authentication", + "userSetupAllowed": false, + "autheticatorFlow": true + } + ] + }, + { + "id": "48692a30-51c6-4fe3-b136-fbee940aa321", + "alias": "Authentication Options", + "description": "Authentication options.", + "providerId": "basic-flow", + "topLevel": false, + "builtIn": true, + "authenticationExecutions": [ + { + "authenticator": "basic-auth", + "requirement": "REQUIRED", + "priority": 10, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "authenticator": "basic-auth-otp", + "requirement": "DISABLED", + "priority": 20, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "authenticator": "auth-spnego", + "requirement": "DISABLED", + "priority": 30, + "userSetupAllowed": false, + "autheticatorFlow": false + } + ] + }, + { + "id": "777ef9b3-c43f-4355-be89-53337933ce76", + "alias": "Browser - Conditional OTP", + "description": "Flow to determine if the OTP is required for the authentication", + "providerId": "basic-flow", + "topLevel": false, + "builtIn": true, + "authenticationExecutions": [ + { + "authenticator": "conditional-user-configured", + "requirement": "REQUIRED", + "priority": 10, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "authenticator": "auth-otp-form", + "requirement": "REQUIRED", + "priority": 20, + "userSetupAllowed": false, + "autheticatorFlow": false + } + ] + }, + { + "id": "eed79d1c-bcd0-43b0-ba9a-f176c79a07e0", + "alias": "Direct Grant - Conditional OTP", + "description": "Flow to determine if the OTP is required for the authentication", + "providerId": "basic-flow", + "topLevel": false, + "builtIn": true, + "authenticationExecutions": [ + { + "authenticator": "conditional-user-configured", + "requirement": "REQUIRED", + "priority": 10, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "authenticator": "direct-grant-validate-otp", + "requirement": "REQUIRED", + "priority": 20, + "userSetupAllowed": false, + "autheticatorFlow": false + } + ] + }, + { + "id": "d4d354ef-37af-460c-abd9-476a21e93757", + "alias": "First broker login - Conditional OTP", + "description": "Flow to determine if the OTP is required for the authentication", + "providerId": "basic-flow", + "topLevel": false, + "builtIn": true, + "authenticationExecutions": [ + { + "authenticator": "conditional-user-configured", + "requirement": "REQUIRED", + "priority": 10, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "authenticator": "auth-otp-form", + "requirement": "REQUIRED", + "priority": 20, + "userSetupAllowed": false, + "autheticatorFlow": false + } + ] + }, + { + "id": "639a996e-9abb-492c-bc02-eb2f2560b38a", + "alias": "Handle Existing Account", + "description": "Handle what to do if there is existing account with same email/username like authenticated identity provider", + "providerId": "basic-flow", + "topLevel": false, + "builtIn": true, + "authenticationExecutions": [ + { + "authenticator": "idp-confirm-link", + "requirement": "REQUIRED", + "priority": 10, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "requirement": "REQUIRED", + "priority": 20, + "flowAlias": "Account verification options", + "userSetupAllowed": false, + "autheticatorFlow": true + } + ] + }, + { + "id": "fa63d521-96aa-438d-bd41-e3966e72f55e", + "alias": "Reset - Conditional OTP", + "description": "Flow to determine if the OTP should be reset or not. Set to REQUIRED to force.", + "providerId": "basic-flow", + "topLevel": false, + "builtIn": true, + "authenticationExecutions": [ + { + "authenticator": "conditional-user-configured", + "requirement": "REQUIRED", + "priority": 10, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "authenticator": "reset-otp", + "requirement": "REQUIRED", + "priority": 20, + "userSetupAllowed": false, + "autheticatorFlow": false + } + ] + }, + { + "id": "1e5d2dad-7bed-4dc0-b282-9c88234813a3", + "alias": "User creation or linking", + "description": "Flow for the existing/non-existing user alternatives", + "providerId": "basic-flow", + "topLevel": false, + "builtIn": true, + "authenticationExecutions": [ + { + "authenticatorConfig": "create unique user config", + "authenticator": "idp-create-user-if-unique", + "requirement": "ALTERNATIVE", + "priority": 10, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "requirement": "ALTERNATIVE", + "priority": 20, + "flowAlias": "Handle Existing Account", + "userSetupAllowed": false, + "autheticatorFlow": true + } + ] + }, + { + "id": "8af61fbd-e7c0-427f-8518-d97038004baa", + "alias": "Verify Existing Account by Re-authentication", + "description": "Reauthentication of existing account", + "providerId": "basic-flow", + "topLevel": false, + "builtIn": true, + "authenticationExecutions": [ + { + "authenticator": "idp-username-password-form", + "requirement": "REQUIRED", + "priority": 10, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "requirement": "CONDITIONAL", + "priority": 20, + "flowAlias": "First broker login - Conditional OTP", + "userSetupAllowed": false, + "autheticatorFlow": true + } + ] + }, + { + "id": "1e83f808-4e5a-4de0-9de2-9ba8368512d0", + "alias": "browser", + "description": "browser based authentication", + "providerId": "basic-flow", + "topLevel": true, + "builtIn": true, + "authenticationExecutions": [ + { + "authenticator": "auth-cookie", + "requirement": "ALTERNATIVE", + "priority": 10, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "authenticator": "auth-spnego", + "requirement": "DISABLED", + "priority": 20, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "authenticator": "identity-provider-redirector", + "requirement": "ALTERNATIVE", + "priority": 25, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "requirement": "ALTERNATIVE", + "priority": 30, + "flowAlias": "forms", + "userSetupAllowed": false, + "autheticatorFlow": true + } + ] + }, + { + "id": "46a91bdf-5d7b-4b71-a0e1-618ec3f42b33", + "alias": "clients", + "description": "Base authentication for clients", + "providerId": "client-flow", + "topLevel": true, + "builtIn": true, + "authenticationExecutions": [ + { + "authenticator": "client-secret", + "requirement": "ALTERNATIVE", + "priority": 10, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "authenticator": "client-jwt", + "requirement": "ALTERNATIVE", + "priority": 20, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "authenticator": "client-secret-jwt", + "requirement": "ALTERNATIVE", + "priority": 30, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "authenticator": "client-x509", + "requirement": "ALTERNATIVE", + "priority": 40, + "userSetupAllowed": false, + "autheticatorFlow": false + } + ] + }, + { + "id": "5fe243d2-627f-4e4b-832d-49492d531aaf", + "alias": "direct grant", + "description": "OpenID Connect Resource Owner Grant", + "providerId": "basic-flow", + "topLevel": true, + "builtIn": true, + "authenticationExecutions": [ + { + "authenticator": "direct-grant-validate-username", + "requirement": "REQUIRED", + "priority": 10, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "authenticator": "direct-grant-validate-password", + "requirement": "REQUIRED", + "priority": 20, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "requirement": "CONDITIONAL", + "priority": 30, + "flowAlias": "Direct Grant - Conditional OTP", + "userSetupAllowed": false, + "autheticatorFlow": true + } + ] + }, + { + "id": "6318addc-3574-4454-983e-c6b7ffcd3a4b", + "alias": "docker auth", + "description": "Used by Docker clients to authenticate against the IDP", + "providerId": "basic-flow", + "topLevel": true, + "builtIn": true, + "authenticationExecutions": [ + { + "authenticator": "docker-http-basic-authenticator", + "requirement": "REQUIRED", + "priority": 10, + "userSetupAllowed": false, + "autheticatorFlow": false + } + ] + }, + { + "id": "096a7c3e-123a-4640-a17a-420f0869b920", + "alias": "first broker login", + "description": "Actions taken after first broker login with identity provider account, which is not yet linked to any Keycloak account", + "providerId": "basic-flow", + "topLevel": true, + "builtIn": true, + "authenticationExecutions": [ + { + "authenticatorConfig": "review profile config", + "authenticator": "idp-review-profile", + "requirement": "REQUIRED", + "priority": 10, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "requirement": "REQUIRED", + "priority": 20, + "flowAlias": "User creation or linking", + "userSetupAllowed": false, + "autheticatorFlow": true + } + ] + }, + { + "id": "9362093f-6e56-4e24-a794-fd99b04647ec", + "alias": "forms", + "description": "Username, password, otp and other auth forms.", + "providerId": "basic-flow", + "topLevel": false, + "builtIn": true, + "authenticationExecutions": [ + { + "authenticator": "auth-username-password-form", + "requirement": "REQUIRED", + "priority": 10, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "requirement": "CONDITIONAL", + "priority": 20, + "flowAlias": "Browser - Conditional OTP", + "userSetupAllowed": false, + "autheticatorFlow": true + } + ] + }, + { + "id": "05d10713-f8e1-40b8-8d8a-b0259bb896cc", + "alias": "http challenge", + "description": "An authentication flow based on challenge-response HTTP Authentication Schemes", + "providerId": "basic-flow", + "topLevel": true, + "builtIn": true, + "authenticationExecutions": [ + { + "authenticator": "no-cookie-redirect", + "requirement": "REQUIRED", + "priority": 10, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "requirement": "REQUIRED", + "priority": 20, + "flowAlias": "Authentication Options", + "userSetupAllowed": false, + "autheticatorFlow": true + } + ] + }, + { + "id": "94ded116-951f-47b9-8784-302a3db212a3", + "alias": "registration", + "description": "registration flow", + "providerId": "basic-flow", + "topLevel": true, + "builtIn": true, + "authenticationExecutions": [ + { + "authenticator": "registration-page-form", + "requirement": "REQUIRED", + "priority": 10, + "flowAlias": "registration form", + "userSetupAllowed": false, + "autheticatorFlow": true + } + ] + }, + { + "id": "e2a1d0a8-6737-4b46-a000-3a2e18e8a510", + "alias": "registration form", + "description": "registration form", + "providerId": "form-flow", + "topLevel": false, + "builtIn": true, + "authenticationExecutions": [ + { + "authenticator": "registration-user-creation", + "requirement": "REQUIRED", + "priority": 20, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "authenticator": "registration-profile-action", + "requirement": "REQUIRED", + "priority": 40, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "authenticator": "registration-password-action", + "requirement": "REQUIRED", + "priority": 50, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "authenticator": "registration-recaptcha-action", + "requirement": "DISABLED", + "priority": 60, + "userSetupAllowed": false, + "autheticatorFlow": false + } + ] + }, + { + "id": "9e3f6191-651d-44c9-bc13-7ae29cb16b00", + "alias": "reset credentials", + "description": "Reset credentials for a user if they forgot their password or something", + "providerId": "basic-flow", + "topLevel": true, + "builtIn": true, + "authenticationExecutions": [ + { + "authenticator": "reset-credentials-choose-user", + "requirement": "REQUIRED", + "priority": 10, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "authenticator": "reset-credential-email", + "requirement": "REQUIRED", + "priority": 20, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "authenticator": "reset-password", + "requirement": "REQUIRED", + "priority": 30, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "requirement": "CONDITIONAL", + "priority": 40, + "flowAlias": "Reset - Conditional OTP", + "userSetupAllowed": false, + "autheticatorFlow": true + } + ] + }, + { + "id": "2d46ca88-55fc-4642-9597-58dfca63031f", + "alias": "saml ecp", + "description": "SAML ECP Profile Authentication Flow", + "providerId": "basic-flow", + "topLevel": true, + "builtIn": true, + "authenticationExecutions": [ + { + "authenticator": "http-basic-authenticator", + "requirement": "REQUIRED", + "priority": 10, + "userSetupAllowed": false, + "autheticatorFlow": false + } + ] + } + ], + "authenticatorConfig": [ + { + "id": "ff1675d5-d2d2-4da4-8e26-070a4a5e9cf2", + "alias": "create unique user config", + "config": { + "require.password.update.after.registration": "false" + } + }, + { + "id": "6fa888ed-ce06-4d7a-8e38-66b4e6956a42", + "alias": "review profile config", + "config": { + "update.profile.on.first.login": "missing" + } + } + ], + "requiredActions": [ + { + "alias": "CONFIGURE_TOTP", + "name": "Configure OTP", + "providerId": "CONFIGURE_TOTP", + "enabled": true, + "defaultAction": false, + "priority": 10, + "config": {} + }, + { + "alias": "terms_and_conditions", + "name": "Terms and Conditions", + "providerId": "terms_and_conditions", + "enabled": false, + "defaultAction": false, + "priority": 20, + "config": {} + }, + { + "alias": "UPDATE_PASSWORD", + "name": "Update Password", + "providerId": "UPDATE_PASSWORD", + "enabled": true, + "defaultAction": false, + "priority": 30, + "config": {} + }, + { + "alias": "UPDATE_PROFILE", + "name": "Update Profile", + "providerId": "UPDATE_PROFILE", + "enabled": true, + "defaultAction": false, + "priority": 40, + "config": {} + }, + { + "alias": "VERIFY_EMAIL", + "name": "Verify Email", + "providerId": "VERIFY_EMAIL", + "enabled": true, + "defaultAction": false, + "priority": 50, + "config": {} + }, + { + "alias": "delete_account", + "name": "Delete Account", + "providerId": "delete_account", + "enabled": false, + "defaultAction": false, + "priority": 60, + "config": {} + }, + { + "alias": "update_user_locale", + "name": "Update User Locale", + "providerId": "update_user_locale", + "enabled": true, + "defaultAction": false, + "priority": 1000, + "config": {} + } + ], + "browserFlow": "browser", + "registrationFlow": "registration", + "directGrantFlow": "direct grant", + "resetCredentialsFlow": "reset credentials", + "clientAuthenticationFlow": "clients", + "dockerAuthenticationFlow": "docker auth", + "attributes": { + "clientOfflineSessionMaxLifespan": "0", + "clientSessionIdleTimeout": "0", + "clientSessionMaxLifespan": "0", + "clientOfflineSessionIdleTimeout": "0" + }, + "keycloakVersion": "12.0.4", + "userManagedAccessAllowed": false +} \ No newline at end of file diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000000000000000000000000000000000000..aaf5061a59829789ec5f1d3884f0c3c2f1a558c2 --- /dev/null +++ b/nginx.conf @@ -0,0 +1,43 @@ + server { + listen 80; + server_name _; + + + + root /usr/share/nginx/html; + index index.html index.htm; + include /etc/nginx/mime.types; + + + + gzip on; + gzip_min_length 1000; + gzip_proxied expired no-cache no-store private auth; + gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript; + + + + location / { + try_files $uri $uri/ /index.html; + + add_header 'Access-Control-Allow-Origin' '*'; + add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS, DELETE'; + + if ($request_method = 'OPTIONS') { + add_header 'Access-Control-Allow-Origin' '*'; + add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS, DELETE'; + # + # Custom headers and headers various browsers *should* be OK with but aren't + # + add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range'; + # + # Tell client that this pre-flight info is valid for 20 days + # + return 204; + } + if ($request_method = 'DELETE') { + add_header 'Access-Control-Allow-Origin' '*'; + add_header 'Access-Control-Allow-Methods' 'DELETE'; + } + } + } \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 8e88c4c0f2f64639561e4d9bf1c75917ec3b088b..b8a561b0e104dabaebef182b012690ed04af39d5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2351,12 +2351,41 @@ "viz.js": "^1.8.0" } }, + "@fortawesome/angular-fontawesome": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/@fortawesome/angular-fontawesome/-/angular-fontawesome-0.8.2.tgz", + "integrity": "sha512-K/AiykA4YbHKE6XKEtZ0ZvVRQocUHyk+79HYWIfhGy3teHpzxsUqB/UjDaxivgBd6dF6ihlzgEbgrDMHlGNwGg==", + "requires": { + "tslib": "^2.1.0" + } + }, + "@fortawesome/fontawesome-common-types": { + "version": "0.2.35", + "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-0.2.35.tgz", + "integrity": "sha512-IHUfxSEDS9dDGqYwIW7wTN6tn/O8E0n5PcAHz9cAaBoZw6UpG20IG/YM3NNLaGPwPqgjBAFjIURzqoQs3rrtuw==" + }, "@fortawesome/fontawesome-free": { "version": "5.14.0", "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-free/-/fontawesome-free-5.14.0.tgz", "integrity": "sha512-OfdMsF+ZQgdKHP9jUbmDcRrP0eX90XXrsXIdyjLbkmSBzmMXPABB8eobUJtivaupucYaByz6WNe1PI1JuYm3qA==", "dev": true }, + "@fortawesome/fontawesome-svg-core": { + "version": "1.2.35", + "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-svg-core/-/fontawesome-svg-core-1.2.35.tgz", + "integrity": "sha512-uLEXifXIL7hnh2sNZQrIJWNol7cTVIzwI+4qcBIq9QWaZqUblm0IDrtSqbNg+3SQf8SMGHkiSigD++rHmCHjBg==", + "requires": { + "@fortawesome/fontawesome-common-types": "^0.2.35" + } + }, + "@fortawesome/free-solid-svg-icons": { + "version": "5.15.3", + "resolved": "https://registry.npmjs.org/@fortawesome/free-solid-svg-icons/-/free-solid-svg-icons-5.15.3.tgz", + "integrity": "sha512-XPeeu1IlGYqz4VWGRAT5ukNMd4VHUEEJ7ysZ7pSSgaEtNvSo+FLurybGJVmiqkQdK50OkSja2bfZXOeyMGRD8Q==", + "requires": { + "@fortawesome/fontawesome-common-types": "^0.2.35" + } + }, "@istanbuljs/schema": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.2.tgz", @@ -3423,16 +3452,6 @@ "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=" }, - "angular-auth-oidc-client": { - "version": "11.4.5", - "resolved": "https://registry.npmjs.org/angular-auth-oidc-client/-/angular-auth-oidc-client-11.4.5.tgz", - "integrity": "sha512-QNQIOFE4rYU/rhq9HgDDUC+6nt7CWfyo16B+BP6AokIoAijkSZIsHz7Tpbt9ZSQKVulkM0xgWmtNsbBsV/GTog==", - "requires": { - "common-tags": "^1.8.0", - "jsrsasign-reduced": "^8.0.15", - "tslib": "^2.0.0" - } - }, "angular2-chartjs": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/angular2-chartjs/-/angular2-chartjs-0.4.1.tgz", @@ -5255,11 +5274,6 @@ "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", "dev": true }, - "common-tags": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/common-tags/-/common-tags-1.8.0.tgz", - "integrity": "sha512-6P6g0uetGpW/sdyUy/iQQCbFF0kWVMSIVSyYz7Zgjcgh8mgw8PQzDNZeyZ5DQ2gM7LBoZPHmnjz8rUthkBG5tw==" - }, "commondir": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", @@ -11480,11 +11494,6 @@ } } }, - "jsrsasign-reduced": { - "version": "8.0.15", - "resolved": "https://registry.npmjs.org/jsrsasign-reduced/-/jsrsasign-reduced-8.0.15.tgz", - "integrity": "sha512-Ig4W69nXCIUedzOSk3nqJWUr2DmSDENYfsmCqVK33GPETtPcjwREGQc92hV5jcJ6zavMvGD4tjhZ+T7JIiaSLA==" - }, "jszip": { "version": "3.5.0", "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.5.0.tgz", @@ -13432,6 +13441,11 @@ } } }, + "ngx-pagination": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ngx-pagination/-/ngx-pagination-5.0.0.tgz", + "integrity": "sha512-Ur0pTWRe2ZXoJ8impEzo0IZKxY5aEcQfSmL5uBqW1rHI2J6nfzgZAHsSLagKHFGchXq0PkRlDVVMcIaNxYJwvQ==" + }, "nice-try": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", diff --git a/package.json b/package.json index 8e0d6c6bd71591a690857081820279ceb869158d..6e462deabb81b9dbb6adafc17bd00b73ac8b6d70 100644 --- a/package.json +++ b/package.json @@ -44,6 +44,9 @@ "@angular/platform-browser-dynamic": "^11.0.9", "@angular/router": "^11.0.9", "@asymmetrik/ngx-leaflet": "3.0.1", + "@fortawesome/angular-fontawesome": "^0.8.2", + "@fortawesome/fontawesome-svg-core": "^1.2.34", + "@fortawesome/free-solid-svg-icons": "^5.15.2", "@nebular/auth": "7.0.0", "@nebular/eva-icons": "7.0.0", "@nebular/security": "7.0.0", @@ -69,6 +72,7 @@ "ng2-smart-table": "^1.6.0", "ngx-echarts": "^4.2.2", "ngx-owl-carousel-o": "^4.0.0", + "ngx-pagination": "^5.0.0", "node-sass": "^4.14.1", "normalize.css": "6.0.0", "pace-js": "1.0.2", diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 59509eed222550a8c7b2a14a21ad77528132da14..3971b76d659c213cfd6d62e9f33730ff155425d7 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -18,7 +18,10 @@ import { OidcJWTToken } from './auth/oidc/oidc'; }) export class AppComponent implements OnInit { - constructor(private analytics: AnalyticsService, private seoService: SeoService, private configService: ConfigService, + + constructor(private analytics: AnalyticsService, + private seoService: SeoService, + private configService: ConfigService, authService: NbAuthService, // force construction of the auth service oauthStrategy: NbOAuth2AuthStrategy) { diff --git a/src/app/auth/services/auth.guard.ts b/src/app/auth/services/auth.guard.ts index 555087e589457558e9bcecd81e4699acb1bf5340..8fbe1f44b5a7356ad57ecbfdac795d5396ad9dd3 100644 --- a/src/app/auth/services/auth.guard.ts +++ b/src/app/auth/services/auth.guard.ts @@ -1,6 +1,7 @@ import { Injectable } from '@angular/core'; -import { CanActivate, Router} from '@angular/router'; +import { CanActivate, Router } from '@angular/router'; import { NbAuthService } from '@nebular/auth'; +import { ConfigService } from '@ngx-config/core'; import { tap } from 'rxjs/operators'; @@ -9,18 +10,23 @@ import { tap } from 'rxjs/operators'; }) export class AuthGuard implements CanActivate { - constructor(private authService: NbAuthService, private router: Router) { + constructor(private authService: NbAuthService, private router: Router, private configService: ConfigService) { } canActivate() { - return this.authService.isAuthenticated() - .pipe( - tap(authenticated => { - if (!authenticated) { - this.router.navigate(['auth/']); - } - }), - ); + + if (!this.configService.getSettings('enableAuthentication')) { + return true; + } else { + return this.authService.isAuthenticated() + .pipe( + tap(authenticated => { + if (!authenticated) { + this.router.navigate(['auth/']); + } + }), + ); + } } - + } diff --git a/src/app/auth/services/token.interceptor.ts b/src/app/auth/services/token.interceptor.ts index 88712e4d12f3aff403c3db5c5348bc9ba9a64ac5..ae1ddb56f6b5decf73ed26a7a25fe3cb39d7f61d 100644 --- a/src/app/auth/services/token.interceptor.ts +++ b/src/app/auth/services/token.interceptor.ts @@ -28,12 +28,16 @@ export class TokenInterceptor implements HttpInterceptor { return next.handle(req); } - - this.auth.getToken().subscribe((x: NbAuthOAuth2JWTToken) => this.token = x); + let newHeaders = req.headers; - if (this.token.getPayload() != null) { - newHeaders = newHeaders.append('Authorization', 'Bearer ' + this.token.getPayload().access_token); + + if(this.config.getSettings('enableAuthentication')){ + this.auth.getToken().subscribe((x: NbAuthOAuth2JWTToken) => this.token = x); + if (this.token.getPayload() != null) { + newHeaders = newHeaders.append('Authorization', 'Bearer ' + this.token.getPayload().access_token); + } } + const authReq = req.clone({ headers: newHeaders }); return next.handle(authReq); } diff --git a/src/app/pages/data-catalogue/data-catalogue-routing.module.ts b/src/app/pages/data-catalogue/data-catalogue-routing.module.ts deleted file mode 100644 index cd15f655b342fbb545622e90aef5cf3be0adb772..0000000000000000000000000000000000000000 --- a/src/app/pages/data-catalogue/data-catalogue-routing.module.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { NgModule } from '@angular/core'; -import { RouterModule, Routes } from '@angular/router'; -import { DataCatalogueComponent } from './data-catalogue.component'; -import { DatasetComponent } from './dataset/dataset.component'; -import { SearchComponent } from './search/search.component'; - -const routes: Routes = [{ - path: '', - redirectTo:'', - component: DataCatalogueComponent, - children: [ { - path: 'search', - component: SearchComponent, - }, { - path: 'datasets/:id', - component: DatasetComponent, - }], -}]; - -@NgModule({ - imports: [RouterModule.forChild(routes)], - exports: [RouterModule] -}) -export class DataCatalogueRoutingModule { } diff --git a/src/app/pages/data-catalogue/data-catalogue.component.ts b/src/app/pages/data-catalogue/data-catalogue.component.ts deleted file mode 100644 index 2a41c6fb3f39020f61ce6b32969d2e4f376f720a..0000000000000000000000000000000000000000 --- a/src/app/pages/data-catalogue/data-catalogue.component.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { Component, OnInit } from '@angular/core'; - -@Component({ - selector: 'ngx-data-catalogue', - template: ` - <router-outlet></router-outlet> - `, -}) -export class DataCatalogueComponent implements OnInit { - - constructor() { } - - ngOnInit(): void { - } - -} diff --git a/src/app/pages/data-catalogue/data-catalogue.module.ts b/src/app/pages/data-catalogue/data-catalogue.module.ts deleted file mode 100644 index 97283a3c0ee218f7e25dadddf9ddda3ddae6913b..0000000000000000000000000000000000000000 --- a/src/app/pages/data-catalogue/data-catalogue.module.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; - -import { DataCatalogueRoutingModule } from './data-catalogue-routing.module'; -import { SearchComponent } from './search/search.component'; -import { DatasetComponent } from './dataset/dataset.component'; -import { DataCatalogueComponent } from './data-catalogue.component'; - - -@NgModule({ - declarations: [DataCatalogueComponent, SearchComponent, DatasetComponent], - imports: [ - CommonModule, - DataCatalogueRoutingModule - ] -}) -export class DataCatalogueModule { } diff --git a/src/app/pages/data-catalogue/dataset/dataset.component.html b/src/app/pages/data-catalogue/dataset/dataset.component.html deleted file mode 100644 index c2bf737f153195cc8e20261bfec69f4af7c79d59..0000000000000000000000000000000000000000 --- a/src/app/pages/data-catalogue/dataset/dataset.component.html +++ /dev/null @@ -1 +0,0 @@ -<p>dataset works!</p> diff --git a/src/app/pages/data-catalogue/dataset/dataset.component.scss b/src/app/pages/data-catalogue/dataset/dataset.component.scss deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/src/app/pages/data-catalogue/dataset/dataset.component.spec.ts b/src/app/pages/data-catalogue/dataset/dataset.component.spec.ts deleted file mode 100644 index 13950bc3f906626bebb24e173ab9d29ee5c50866..0000000000000000000000000000000000000000 --- a/src/app/pages/data-catalogue/dataset/dataset.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { ComponentFixture, TestBed } from '@angular/core/testing'; - -import { DatasetComponent } from './dataset.component'; - -describe('DatasetComponent', () => { - let component: DatasetComponent; - let fixture: ComponentFixture<DatasetComponent>; - - beforeEach(async () => { - await TestBed.configureTestingModule({ - declarations: [ DatasetComponent ] - }) - .compileComponents(); - }); - - beforeEach(() => { - fixture = TestBed.createComponent(DatasetComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/pages/data-catalogue/dataset/dataset.component.ts b/src/app/pages/data-catalogue/dataset/dataset.component.ts deleted file mode 100644 index 6eb42df092a8d8ea072c2f23fbaa82e149bd8778..0000000000000000000000000000000000000000 --- a/src/app/pages/data-catalogue/dataset/dataset.component.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { Component, OnInit } from '@angular/core'; - -@Component({ - selector: 'ngx-dataset', - templateUrl: './dataset.component.html', - styleUrls: ['./dataset.component.scss'] -}) -export class DatasetComponent implements OnInit { - - constructor() { } - - ngOnInit(): void { - } - -} diff --git a/src/app/pages/data-catalogue/model/datalet.ts b/src/app/pages/data-catalogue/model/datalet.ts deleted file mode 100644 index 0653b7e257ead9822876e42567a45ca59d657851..0000000000000000000000000000000000000000 --- a/src/app/pages/data-catalogue/model/datalet.ts +++ /dev/null @@ -1,14 +0,0 @@ -export class Datalet { - id?: string; - nodeID?: string; - datasetID?: string; - distributionID?: string; - datalet_html?: string; - title?: string; - customTitle?: boolean; - registerDate?: string; - lastSeenDate?: string; - views?: number; - - constructor(){} -} \ No newline at end of file diff --git a/src/app/pages/data-catalogue/model/dcatapformat.enum.ts b/src/app/pages/data-catalogue/model/dcatapformat.enum.ts deleted file mode 100644 index 39dfb93eb951d3263129956a26fec5234e848de7..0000000000000000000000000000000000000000 --- a/src/app/pages/data-catalogue/model/dcatapformat.enum.ts +++ /dev/null @@ -1,9 +0,0 @@ -export enum DCATAPFormat { - IDRA = "IDRA", - TURTLE = "TURTLE", - NTRIPLES = "NTRIPLES", - RDFXML = "RDF/XML", - N3 = "N3", - RDFJSON = "RDF/JSON", - JSONLD = "JSON-LD", -} \ No newline at end of file diff --git a/src/app/pages/data-catalogue/model/dcatdataset.ts b/src/app/pages/data-catalogue/model/dcatdataset.ts deleted file mode 100644 index 716770791ca5bdf98263147a0b5cd6250561ffcc..0000000000000000000000000000000000000000 --- a/src/app/pages/data-catalogue/model/dcatdataset.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { DCATDistribution } from "./dcatdistribution"; -import { DCTLocation } from "./dctlocation"; -import { DCTPeriodOfTime } from "./dctperiod-of-time"; -import { DCTStandard } from "./dctstandard"; -import { FOAFAgent } from "./foafagent"; -import { SKOSConcept } from "./skosconcept"; -import { VCardOrganization } from "./vcard-organization"; - -export class DCATDataset { - id: string; - nodeID: string; - title: string; - description: string; - distributions?: DCATDistribution[]; - theme?: SKOSConcept[]; - publisher?: FOAFAgent; - contactPoint?: VCardOrganization[]; - keywords?: string[]; - accessRights?: string; - conformsTo?: DCTStandard[]; - documentation?: string[]; - frequency?: string; - hasVersion?: string[]; - isVersionOf?: string[]; - landingPage?: string; - language?: string[]; - provenance?: string[]; - releaseDate?: string; - updateDate?: string; - identifier: string; - otherIdentifier?: string[]; - sample?: string[]; - source?: string[]; - spatialCoverage?: DCTLocation; - temporalCoverage?: DCTPeriodOfTime; - type?: string; - version?: string; - versionNodes?: string[]; - rightsHolder?: FOAFAgent; - creator?: FOAFAgent; - subject?: SKOSConcept[]; - legacyIdentifier?: string; - - constructor(){} -} \ No newline at end of file diff --git a/src/app/pages/data-catalogue/model/dcatdistribution.ts b/src/app/pages/data-catalogue/model/dcatdistribution.ts deleted file mode 100644 index faaa0aff125306444752b8ecdedac40122d2bec6..0000000000000000000000000000000000000000 --- a/src/app/pages/data-catalogue/model/dcatdistribution.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { DCTLicenseDocument } from "./dctlicense-document"; -import { DCTStandard } from "./dctstandard"; -import { SKOSConcept } from "./skosconcept"; -import { SPDXChecksum } from "./spdxchecksum"; - -export class DCATDistribution { - id: string; - storedRDF?: boolean; - nodeID: string; - accessURL: string; - description?: string; - format?: string; - license?: DCTLicenseDocument; - byteSize?: string; - checksum?: SPDXChecksum; - documentation?: string[]; - downloadURL?: string; - language?: string[]; - linkedSchemas?: DCTStandard[]; - mediaType?: string; - releaseDate?: string; - updateDate?: string; - rights?: string; - status?: SKOSConcept; - title?: string; - hasDatalets?: boolean; - - constructor(){} -} \ No newline at end of file diff --git a/src/app/pages/data-catalogue/model/dctlicense-document.ts b/src/app/pages/data-catalogue/model/dctlicense-document.ts deleted file mode 100644 index 611397ea3de275201937e9c4326b48a4a70c941d..0000000000000000000000000000000000000000 --- a/src/app/pages/data-catalogue/model/dctlicense-document.ts +++ /dev/null @@ -1,10 +0,0 @@ -export class DCTLicenseDocument { - id?: string; - nodeID?: string; - uri?: string; - name?: string; - type?: string; - versionInfo?: string; - - constructor(){} -} \ No newline at end of file diff --git a/src/app/pages/data-catalogue/model/dctlocation.ts b/src/app/pages/data-catalogue/model/dctlocation.ts deleted file mode 100644 index 17ab03930eb4428b92dd4c864672c03511c2db07..0000000000000000000000000000000000000000 --- a/src/app/pages/data-catalogue/model/dctlocation.ts +++ /dev/null @@ -1,10 +0,0 @@ -export class DCTLocation { - id?: string; - nodeID?: string; - uri?: string; - geographicalIdentifier?: string; - geographicalName?: string; - geometry?: string; - - constructor(){} -} \ No newline at end of file diff --git a/src/app/pages/data-catalogue/model/dctperiod-of-time.ts b/src/app/pages/data-catalogue/model/dctperiod-of-time.ts deleted file mode 100644 index cb4176f8b5e7295ac2136bb33147248d0d2ba97e..0000000000000000000000000000000000000000 --- a/src/app/pages/data-catalogue/model/dctperiod-of-time.ts +++ /dev/null @@ -1,9 +0,0 @@ -export class DCTPeriodOfTime { - id?: string; - nodeID?: string; - uri?: string; - startDate?: string; - endDate?: string; - - constructor(){} -} \ No newline at end of file diff --git a/src/app/pages/data-catalogue/model/dctstandard.ts b/src/app/pages/data-catalogue/model/dctstandard.ts deleted file mode 100644 index 6f2a46aeb6bdc9b582c211cde5ea92d1d21c590e..0000000000000000000000000000000000000000 --- a/src/app/pages/data-catalogue/model/dctstandard.ts +++ /dev/null @@ -1,10 +0,0 @@ -export class DCTStandard { - id?: string; - nodeID?: string; - identifier?: string; - title?: string; - description?: string; - referenceDocumentation?: string[]; - - constructor(){} -} \ No newline at end of file diff --git a/src/app/pages/data-catalogue/model/error-response.ts b/src/app/pages/data-catalogue/model/error-response.ts deleted file mode 100644 index d771f4f5b1a8cddf3b096ee8aebb41faf358eb1a..0000000000000000000000000000000000000000 --- a/src/app/pages/data-catalogue/model/error-response.ts +++ /dev/null @@ -1,8 +0,0 @@ -export class ErrorResponse { - statusCode: string; - technicalMessage: string; - errorCode: string; - userMessage?: string; - - constructor() { } -} \ No newline at end of file diff --git a/src/app/pages/data-catalogue/model/euro-voc-language.ts b/src/app/pages/data-catalogue/model/euro-voc-language.ts deleted file mode 100644 index 013df9aebd08b46817987194b47f6a97c765f57f..0000000000000000000000000000000000000000 --- a/src/app/pages/data-catalogue/model/euro-voc-language.ts +++ /dev/null @@ -1,32 +0,0 @@ -export class EuroVocLanguage { - languageName?: - | "BG" - | "ES" - | "CS" - | "DA" - | "DE" - | "ET" - | "EL" - | "EN" - | "FR" - | "GA" - | "HR" - | "IT" - | "LV" - | "LT" - | "HU" - | "MT" - | "NL" - | "PL" - | "PT" - | "RO" - | "SK" - | "SL" - | "FI" - | "SV" - | "MK" - | "SQ" - | "SR"; - - constructor(){} -} \ No newline at end of file diff --git a/src/app/pages/data-catalogue/model/foafagent.ts b/src/app/pages/data-catalogue/model/foafagent.ts deleted file mode 100644 index 04301d0a07097051cc4e82853a12e955a2666781..0000000000000000000000000000000000000000 --- a/src/app/pages/data-catalogue/model/foafagent.ts +++ /dev/null @@ -1,13 +0,0 @@ -export class FOAFAgent { - id?: string; - name: string; - resourceUri?: string; - propertyUri?: string; - mbox?: string; - homepage?: string; - type?: string; - identifier?: string; - nodeID: string; - - constructor(){} -} \ No newline at end of file diff --git a/src/app/pages/data-catalogue/model/odmscatalogue-image.ts b/src/app/pages/data-catalogue/model/odmscatalogue-image.ts deleted file mode 100644 index 923c652f8e93c4ee5d875ce3a3d7b3eef333fc10..0000000000000000000000000000000000000000 --- a/src/app/pages/data-catalogue/model/odmscatalogue-image.ts +++ /dev/null @@ -1,6 +0,0 @@ -export class ODMSCatalogueImage { - imageId?: number; - imageData?: string; - - constructor(){} -} \ No newline at end of file diff --git a/src/app/pages/data-catalogue/model/odmscatalogue-info.ts b/src/app/pages/data-catalogue/model/odmscatalogue-info.ts deleted file mode 100644 index bffc5c3300c01efd2cd00940b5026d20cfc20cf0..0000000000000000000000000000000000000000 --- a/src/app/pages/data-catalogue/model/odmscatalogue-info.ts +++ /dev/null @@ -1,7 +0,0 @@ -export class ODMSCatalogueInfo { - id?: number; - name?: string; - federationLevel?: any; - - constructor(){} -} \ No newline at end of file diff --git a/src/app/pages/data-catalogue/model/odmscatalogue-response.ts b/src/app/pages/data-catalogue/model/odmscatalogue-response.ts deleted file mode 100644 index 579d16dcfe4bfcd52b81f1f9872aef9dfac99485..0000000000000000000000000000000000000000 --- a/src/app/pages/data-catalogue/model/odmscatalogue-response.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { ODMSCatalogue } from "./odmscatalogue"; - -export class ODMSCatalogueResponse { - count:number; - catalogues:Array<ODMSCatalogue>=[]; - - constructor(){} -} diff --git a/src/app/pages/data-catalogue/model/odmscatalogue-type.enum.ts b/src/app/pages/data-catalogue/model/odmscatalogue-type.enum.ts deleted file mode 100644 index 2a8296abf86f5b18dc7c505b9295f75839243b3d..0000000000000000000000000000000000000000 --- a/src/app/pages/data-catalogue/model/odmscatalogue-type.enum.ts +++ /dev/null @@ -1,10 +0,0 @@ -export enum ODMSCatalogueType { - CKAN = "CKAN", - SOCRATA = "SOCRATA", - NATIVE = "NATIVE", - WEB = "WEB", - DCATDUMP = "DCATDUMP", - DKAN = "DKAN", - ORION = "ORION", - SPARQL = "SPARQL", -} diff --git a/src/app/pages/data-catalogue/model/odmscatalogue.ts b/src/app/pages/data-catalogue/model/odmscatalogue.ts deleted file mode 100644 index 1b92a5e1842c7db41fdfedacb073bc58ddd2fc36..0000000000000000000000000000000000000000 --- a/src/app/pages/data-catalogue/model/odmscatalogue.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { ODMSCatalogueImage } from "./odmscatalogue-image"; -import { ODMSCatalogueType } from "./odmscatalogue-type.enum"; - - -export class ODMSCatalogue { - id?: string; - name: string; - host: string; - nodeType: ODMSCatalogueType; - publisherName?: string; - publisherUrl?: string; - publisherEmail?: string; - datasetCount?: number; - registerDate?: string; - lastUpdateDate?: string; - description?: string; - image?: ODMSCatalogueImage; - location?: string; - locationDescription?: string; - isActive?: boolean; - country?: string; - category?: string; - - constructor() { } -} \ No newline at end of file diff --git a/src/app/pages/data-catalogue/model/search-date-filter.ts b/src/app/pages/data-catalogue/model/search-date-filter.ts deleted file mode 100644 index 46770fe9877c5a750dd3f27028f1f0e7ceaa3596..0000000000000000000000000000000000000000 --- a/src/app/pages/data-catalogue/model/search-date-filter.ts +++ /dev/null @@ -1,6 +0,0 @@ -export class SearchDateFilter { - start: string; - end: string; - - constructor(){} -} \ No newline at end of file diff --git a/src/app/pages/data-catalogue/model/search-euro-voc-filter.ts b/src/app/pages/data-catalogue/model/search-euro-voc-filter.ts deleted file mode 100644 index d40295191832412c0bdc802928fd4652433bf45f..0000000000000000000000000000000000000000 --- a/src/app/pages/data-catalogue/model/search-euro-voc-filter.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { EuroVocLanguage } from "./euro-voc-language"; - -export class SearchEuroVocFilter { - euroVoc?: boolean=false; - sourceLanguage?: EuroVocLanguage; - targetLanguages?: EuroVocLanguage[]; - - constructor() { } -} diff --git a/src/app/pages/data-catalogue/model/search-facet.ts b/src/app/pages/data-catalogue/model/search-facet.ts deleted file mode 100644 index 4fdf351624046f7caafd472a1e6e7738a1a1df27..0000000000000000000000000000000000000000 --- a/src/app/pages/data-catalogue/model/search-facet.ts +++ /dev/null @@ -1,7 +0,0 @@ -export class SearchFacet { - facet?: string; - keyword?: string; - search_value?: string; - - constructor(){} -} \ No newline at end of file diff --git a/src/app/pages/data-catalogue/model/search-facets-list.ts b/src/app/pages/data-catalogue/model/search-facets-list.ts deleted file mode 100644 index 78ad7b486cd74684adac75bba7f8655bc6d8b9ba..0000000000000000000000000000000000000000 --- a/src/app/pages/data-catalogue/model/search-facets-list.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { SearchFacet } from "./search-facet"; - -export class SearchFacetsList { - displayName?: string; - search_parameter?: string; - values?: SearchFacet[]; - - constructor(){} -} \ No newline at end of file diff --git a/src/app/pages/data-catalogue/model/search-filter.ts b/src/app/pages/data-catalogue/model/search-filter.ts deleted file mode 100644 index c370c764f133a5787c6fa8f9dcc7e55cd721ac6a..0000000000000000000000000000000000000000 --- a/src/app/pages/data-catalogue/model/search-filter.ts +++ /dev/null @@ -1,6 +0,0 @@ -export class SearchFilter { - field: string='ALL'; - value: string=""; - - constructor(){} -} \ No newline at end of file diff --git a/src/app/pages/data-catalogue/model/search-request.ts b/src/app/pages/data-catalogue/model/search-request.ts deleted file mode 100644 index 96cba928b36b6c937b0314e14866bd3c2624bb49..0000000000000000000000000000000000000000 --- a/src/app/pages/data-catalogue/model/search-request.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { SearchDateFilter } from "./search-date-filter"; -import { SearchEuroVocFilter } from "./search-euro-voc-filter"; -import { SearchFilter } from "./search-filter"; -import { SortOption } from "./sort-option"; - -export class SearchRequest { - filters: Array<SearchFilter>=[new SearchFilter()]; - releaseDate?: SearchDateFilter; - updateDate?: SearchDateFilter; - live: boolean = false; - euroVocFilter: SearchEuroVocFilter=new SearchEuroVocFilter(); - sort: SortOption=new SortOption(); - rows: string='10'; - start: string='0'; - nodes?: number[]=[]; - - constructor(){} -} \ No newline at end of file diff --git a/src/app/pages/data-catalogue/model/search-result.ts b/src/app/pages/data-catalogue/model/search-result.ts deleted file mode 100644 index 65b9b6baaf738f5a3eae3ebea5b0b204728a4541..0000000000000000000000000000000000000000 --- a/src/app/pages/data-catalogue/model/search-result.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { DCATDataset } from "./dcatdataset"; -import { SearchFacetsList } from "./search-facets-list"; - -export class SearchResult { - count?: number; - results?: DCATDataset[]; - facets?: SearchFacetsList[]; - - constructor(){} -} \ No newline at end of file diff --git a/src/app/pages/data-catalogue/model/skosconcept.ts b/src/app/pages/data-catalogue/model/skosconcept.ts deleted file mode 100644 index 5304b034b14d2820b53eeaaa20053b923c87ab8e..0000000000000000000000000000000000000000 --- a/src/app/pages/data-catalogue/model/skosconcept.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { SKOSPrefLabel } from "./skospref-label"; - -export class SKOSConcept { - id?: string; - nodeID?: string; - resourceUri?: string; - propertyUri?: string; - prefLabel?: SKOSPrefLabel[]; - - constructor(){} -} \ No newline at end of file diff --git a/src/app/pages/data-catalogue/model/skospref-label.ts b/src/app/pages/data-catalogue/model/skospref-label.ts deleted file mode 100644 index 859f70268924e5eac4ff933f94bbff3ce3955e3d..0000000000000000000000000000000000000000 --- a/src/app/pages/data-catalogue/model/skospref-label.ts +++ /dev/null @@ -1,8 +0,0 @@ -export class SKOSPrefLabel { - id?: string; - nodeID?: string; - language?: string; - value?: string; - - constructor(){} -} \ No newline at end of file diff --git a/src/app/pages/data-catalogue/model/sort-mode.enum.ts b/src/app/pages/data-catalogue/model/sort-mode.enum.ts deleted file mode 100644 index c6dac86c87a14f912dad93ebdf28969e0f60bc25..0000000000000000000000000000000000000000 --- a/src/app/pages/data-catalogue/model/sort-mode.enum.ts +++ /dev/null @@ -1,4 +0,0 @@ -export enum SortMode { - Asc = "asc", - Desc = "desc", -} \ No newline at end of file diff --git a/src/app/pages/data-catalogue/model/sort-option.ts b/src/app/pages/data-catalogue/model/sort-option.ts deleted file mode 100644 index bc02f38ac4b867462cbd51d81d8e10450656b59a..0000000000000000000000000000000000000000 --- a/src/app/pages/data-catalogue/model/sort-option.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { SortMode } from "./sort-mode.enum"; - -export class SortOption { - field?: string = 'id'; - mode?: SortMode = SortMode.Asc; - - constructor(){} -} \ No newline at end of file diff --git a/src/app/pages/data-catalogue/model/spdxchecksum.ts b/src/app/pages/data-catalogue/model/spdxchecksum.ts deleted file mode 100644 index fc46e0410095936021e2c371e273c96319b731d3..0000000000000000000000000000000000000000 --- a/src/app/pages/data-catalogue/model/spdxchecksum.ts +++ /dev/null @@ -1,9 +0,0 @@ -export class SPDXChecksum { - id?: string; - nodeID?: string; - uri?: string; - algorithm?: string; - checksumValue?: string; - - constructor(){} -} \ No newline at end of file diff --git a/src/app/pages/data-catalogue/model/vcard-organization.ts b/src/app/pages/data-catalogue/model/vcard-organization.ts deleted file mode 100644 index 6b4f163508c342f8f0c9c09402fce58c31af4af8..0000000000000000000000000000000000000000 --- a/src/app/pages/data-catalogue/model/vcard-organization.ts +++ /dev/null @@ -1,12 +0,0 @@ -export class VCardOrganization { - id?: string; - resourceUri?: string; - propertyUri?: string; - fn: string; - nodeID: string; - hasEmail?: string; - hasTelephoneValue?: string; - hasTelephoneType?: string; - - constructor(){} -} \ No newline at end of file diff --git a/src/app/pages/data-catalogue/search/search.component.html b/src/app/pages/data-catalogue/search/search.component.html deleted file mode 100644 index 33d92602f359bca6e6502241bed995603eb76429..0000000000000000000000000000000000000000 --- a/src/app/pages/data-catalogue/search/search.component.html +++ /dev/null @@ -1,3 +0,0 @@ -<p>search works!</p> - -<p>{{searchResponse.count}}</p> diff --git a/src/app/pages/data-catalogue/search/search.component.scss b/src/app/pages/data-catalogue/search/search.component.scss deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/src/app/pages/data-catalogue/search/search.component.spec.ts b/src/app/pages/data-catalogue/search/search.component.spec.ts deleted file mode 100644 index 918ce70713eb80531d0a415880fe94ec265bee9c..0000000000000000000000000000000000000000 --- a/src/app/pages/data-catalogue/search/search.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { ComponentFixture, TestBed } from '@angular/core/testing'; - -import { SearchComponent } from './search.component'; - -describe('SearchComponent', () => { - let component: SearchComponent; - let fixture: ComponentFixture<SearchComponent>; - - beforeEach(async () => { - await TestBed.configureTestingModule({ - declarations: [ SearchComponent ] - }) - .compileComponents(); - }); - - beforeEach(() => { - fixture = TestBed.createComponent(SearchComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/pages/data-catalogue/search/search.component.ts b/src/app/pages/data-catalogue/search/search.component.ts deleted file mode 100644 index c9353c53b9e6f2e6cad0696b5277ff1879a9ba6f..0000000000000000000000000000000000000000 --- a/src/app/pages/data-catalogue/search/search.component.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { SearchRequest } from '../model/search-request'; -import { SearchResult } from '../model/search-result'; -import { RestAPIService } from '../services/rest-api.service'; - -@Component({ - selector: 'ngx-search', - templateUrl: './search.component.html', - styleUrls: ['./search.component.scss'] -}) -export class SearchComponent implements OnInit { - - - searchResponse:SearchResult=new SearchResult(); - searchRequest:SearchRequest=new SearchRequest(); - - constructor(private restApi:RestAPIService) { } - - ngOnInit(): void { - this.restApi.getCataloguesInfo().subscribe(infos =>{ - this.searchRequest.nodes = infos.map(x=>x.id) - this.restApi.searchDatasets(this.searchRequest).subscribe(res=>this.searchResponse=res); - }) - } - -} diff --git a/src/app/pages/data-catalogue/services/rest-api.service.spec.ts b/src/app/pages/data-catalogue/services/rest-api.service.spec.ts deleted file mode 100644 index f0977dbec712c0c3c60d924871c334bd7744069e..0000000000000000000000000000000000000000 --- a/src/app/pages/data-catalogue/services/rest-api.service.spec.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { TestBed } from '@angular/core/testing'; - -import { RestAPIService } from './rest-api.service'; - -describe('RestAPIService', () => { - let service: RestAPIService; - - beforeEach(() => { - TestBed.configureTestingModule({}); - service = TestBed.inject(RestAPIService); - }); - - it('should be created', () => { - expect(service).toBeTruthy(); - }); -}); diff --git a/src/app/pages/data-catalogue/services/rest-api.service.ts b/src/app/pages/data-catalogue/services/rest-api.service.ts deleted file mode 100644 index 7c0310c31c8c61185c63bc45d5e4596931a4ce83..0000000000000000000000000000000000000000 --- a/src/app/pages/data-catalogue/services/rest-api.service.ts +++ /dev/null @@ -1,51 +0,0 @@ -import { HttpClient } from '@angular/common/http'; -import { Injectable } from '@angular/core'; -import { ConfigService } from '@ngx-config/core'; -import { Observable } from 'rxjs'; -import { DCATDataset } from '../model/dcatdataset'; -import { ODMSCatalogue } from '../model/odmscatalogue'; -import { ODMSCatalogueInfo } from '../model/odmscatalogue-info'; -import { ODMSCatalogueResponse } from '../model/odmscatalogue-response'; -import { SearchRequest } from '../model/search-request'; -import { SearchResult } from '../model/search-result'; - -@Injectable({ - providedIn: 'root' -}) -export class RestAPIService { - - private apiEndpoint; - - constructor(private config:ConfigService,private http:HttpClient) { - this.apiEndpoint=this.config.getSettings("idra_base_url"); - } - - getDatasetById(id:string):Observable<DCATDataset>{ - return this.http.get<DCATDataset>(`${this.apiEndpoint}/Idra/api/v1/client/datasets/${id}`); - } - - - getDataset(catalogueId:number, id:string):Observable<DCATDataset>{ - return this.http.get<DCATDataset>(`${this.apiEndpoint}/Idra/api/v1/client/catalogues/${catalogueId}/datasets/${id}`); - } - - getDatasets(catalogueId:number):Observable<Array<DCATDataset>>{ - return this.http.get<Array<DCATDataset>>(`${this.apiEndpoint}/Idra/api/v1/client/catalogues/${catalogueId}/datasets`); - } - - getCatalogue(catalogueId:number):Observable<ODMSCatalogue>{ - return this.http.get<ODMSCatalogue>(`${this.apiEndpoint}/Idra/api/v1/client/catalogues/${catalogueId}`); - } - - getCatalogues(/*Use the default server query parameter*/):Observable<ODMSCatalogueResponse>{ - return this.http.get<ODMSCatalogueResponse>(`${this.apiEndpoint}/Idra/api/v1/client/catalogues`); - } - - getCataloguesInfo():Observable<Array<ODMSCatalogueInfo>>{ - return this.http.get<Array<ODMSCatalogueInfo>>(`${this.apiEndpoint}/Idra/api/v1/client/cataloguesInfo`); - } - - searchDatasets(parameters:SearchRequest):Observable<SearchResult>{ - return this.http.post<SearchResult>(`${this.apiEndpoint}/Idra/api/v1/client/search`,parameters); - } -} diff --git a/src/app/pages/pages-menu.ts b/src/app/pages/pages-menu.ts index 7f3fd087b2e121b92cb1d59e4471e74fed6b2183..2e1deeac14c12069e21663f274b7028d7332c622 100644 --- a/src/app/pages/pages-menu.ts +++ b/src/app/pages/pages-menu.ts @@ -13,14 +13,6 @@ export const MENU_ITEMS: NbMenuItem[] = [ name:"home" } }, - { - title: 'Data Catalogue', - icon: 'home-outline', - link: "/pages/catalogues", - data:{ - name:"catalogues" - } - }, { title: 'Maps', icon: 'map-outline', diff --git a/src/app/pages/pages-routing.module.ts b/src/app/pages/pages-routing.module.ts index 41ab757b4ee4a8d940eb978b18fef905199e602f..2afc117e381f7e3fcb98d6294031ac4e6581f7f6 100644 --- a/src/app/pages/pages-routing.module.ts +++ b/src/app/pages/pages-routing.module.ts @@ -39,11 +39,6 @@ const routes: Routes = [{ loadChildren: () => import('./charts/charts.module') .then(m => m.ChartsModule), }, - { - path: 'catalogues', - loadChildren: () => import('./data-catalogue/data-catalogue.module') - .then(m => m.DataCatalogueModule), - }, { path: '', redirectTo: 'home', diff --git a/src/app/pages/pages.component.ts b/src/app/pages/pages.component.ts index 7ee881adbc4c894641700c723aa0157f05e23d13..38f3e09f06329e9d3f018d909055089b6d0b1327 100644 --- a/src/app/pages/pages.component.ts +++ b/src/app/pages/pages.component.ts @@ -1,6 +1,7 @@ import { Component, OnInit } from '@angular/core'; import { NbAccessChecker } from '@nebular/security'; import { NbMenuItem } from '@nebular/theme'; +import { ConfigService } from '@ngx-config/core'; import { MENU_ITEMS } from './pages-menu'; @@ -19,11 +20,14 @@ export class PagesComponent implements OnInit { menu = MENU_ITEMS; userRoles: string[]; constructor( - private accessChecker: NbAccessChecker) { + private accessChecker: NbAccessChecker, + private configService: ConfigService) { } ngOnInit() { - this.authMenuItems(); + if (this.configService.getSettings('enableAuthentication')) { + this.authMenuItems(); + } } authMenuItems() { diff --git a/src/assets/config.json b/src/assets/config.json index a81ecb0ec3ae74d93dfc43fee4df900b1b1c34b1..401b58ecad8a4ef8debfd4d265c940b7043e114d 100644 --- a/src/assets/config.json +++ b/src/assets/config.json @@ -1,6 +1,7 @@ { + "enableAuthentication":false, "authProfile": "oidc", - "idmBaseURL":"http://192.168.99.103:8080/auth/realms/urbanite/protocol/openid-connect", + "idmBaseURL":"http://localhost:8080/auth/realms/urbanite/protocol/openid-connect", "dashboardBaseURL":"http://localhost:4200", "client_id":"urbanite", "client_secret": "",