Application.YML

Application.YML

This application.yml file contains the configuration information needed for the genOSLC example application. It specifies:

  • Security configuration details, including oauth2 client information

  • Server SSL details

  • List of administrator user IDs

  • Server title, description, version and other identifying information

  • Resource labels and icons

  • The supported OSLC domain resources

  • Server information including the public URI and database information

  • CORS configuration

  • TRS configuration

Note that this file may contain sensitive security information that should be managed appropriately. That information has been elided in this documentation. For MID internal development, an application-local.yml profile contains configuration information necessary to run the example at MID.

example-data-path: ${EXAMPLE_DATA_PATH:classpath:data} spring: security: # for simple spring security we need the following # user: # name: "user" # password: "password" # for simple OIDC security we need the following # but it must be removed for SPRING security # # see also https://docs.spring.io/spring-security/site/docs/5.2.12.RELEASE/reference/html/oauth2.html oauth2: client: registration: # client information for logged-in user custom: client-id: ${CLIENT_ID:client-id} client-secret: ${CLIENT_SECRET:client-secret} redirect-uri: ${smartfacts.genoslc.public-uri:}/login/oauth2/code/custom scope: ${CLIENT_SCOPE:openid} authorization-grant-type: authorization_code # client information for outbound technical user # this MUST have the token claim for outbound technical user: see AuthenticationContext these are currently # downstream_auth=techuser custom-technical-user: client-id: ${TECHNICAL_USER_CLIENT_ID:client-id} #genoslc-development client-secret: ${TECHNICAL_USER_CLIENT_SECRET:client-secret} scope: ${TECHNICAL_USER_CLIENT_SCOPE:openid} authorization-grant-type: client_credentials provider: custom: issuer-uri: https://keycloak.mid.de/realms/Smartfacts-Development user-name-attribute: ${USER_NAME_ATTRIBUTE:preferred_username} user-info-authentication-method: ${USER_INFO_AUTHENTICATION_METHOD:form} # header, form, query custom-technical-user: issuer-uri: https://keycloak.mid.de/realms/Smartfacts-Development user-name-attribute: ${USER_NAME_ATTRIBUTE:preferred_username} user-info-authentication-method: ${USER_INFO_AUTHENTICATION_METHOD:form} # header, form, query resourceserver: jwt: issuer-uri: https://keycloak.mid.de/realms/Smartfacts-Development mustache: prefix: classpath:/templates/ suffix: .mustache server: ssl: key-store: classpath:ssl/springboot.jks key-store-password: changeit key-store-type: pkcs12 key-alias: springboot key-password: changeit servlet: session: cookie: secure: true same-site: "none" http-only: true timeout: 3h error: include-message: on-param port: ${PORT:8443} smartfacts: encryption-key: "encryption-key" genoslc: multi-tenancy: tenants: - foo - bar administrators: - msbalaba - arwolf - oryuro - fkasseg - jamsden oidc-web-client-provider: client-registration-id: "custom" technical-user-registration-id: "custom-technical-user" user-name-attribute: "preferred_username" # the following is information about the integration # integration-info: title: "genOSLC Example" description: "genOSLC Example Description" version: "0.1" # required application-about, and used as the local configuration label short-title: "Example" abbreviation: "EXP" # this defaults to short-title identifier: "http://smartfacts.com/ns/Example" icon: "/graphics/genoslc.svg" property-namespace: "http://smartfacts.com/ns/" resource-labels: # For the best results these icons should be SVG with a default size of 16x16 service-provider: "Project" service-provider-icon: "/graphics/genoslc.svg" component: "Component" component-icon: "/graphics/component.svg" local-configuration: "Configuration" stream: "Stream" stream-icon: "/graphics/stream.svg" baseline: "Baseline" baseline-icon: "/graphics/baseline.svg" # do all service provider have exactly one component? # this is often the case service-provider-component-singleton: false adapted-tool: name: ${ADAPTED_TOOL_NAME:example} api-uri: ${ADAPTED_TOOL_API_URI:${PUBLIC_URI:https://genoslc:${server.port}}} root-uri: ${ADAPTED_TOOL_ROOT_URI:${PUBLIC_URI:https://genoslc:${server.port}}} time-zone: ${ADAPTED_TOOL_TOOL_TIME_ZONE:UTC} technical-user-authorization-header: ${ADAPTED_TOOL_TECHNICAL_USER_AUTHORIZATION_HEADER:} restricted-component-ids: ${ADAPTED_TOOL_RESTRICTED_COMPONENT_IDS:} oslc-domains: - domain: http://open-services.net/ns/qm# types: [ { type: "http://open-services.net/ns/qm#TestCase", label: "Test Case" } ] - domain: http://open-services.net/ns/rm# types: [ { type: "http://open-services.net/ns/rm#Requirement", label: "Requirement" } ] - domain: http://open-services.net/ns/cm# types: [ { type: "http://open-services.net/ns/cm#ChangeRequest", label: "Issue" } ] - domain: http://open-services.net/ns/am# # abbreviation: "EXM" # this defaults to abbreviation in the metamodel types: [ { type: "http://open-services.net/ns/am#Resource", label: "Architecture Element" } ] # Where do we get the OSLC Schema? # This allows for multiple comma seperated values # # "external" : this integration gets all schema elements from elsewhere e.g. smartfacts, # **this value excludes the other two** # # "user-defined" : an admin user may define schema elements # e.g. link types and they are stored in this instance # # "internal-fixed" : DEFAULT, The schema includes only read-only elements defined in the integration. # This is done creating a bean of type IOslcSchema, it defaults to JazzOslcSchema # oslc-schema-sources: "internal-fixed, user-defined" public-uri: ${PUBLIC_URI:https://genoslc:${server.port}} plugin-uri: ${PLUGIN_URI:https://genoslc:${server.port}}/spa mongo-uri: ${MONGO_URI:mongodb://localhost:27017} db-name: ${DB_NAME:oslc-demo} allowed-cors-origins: ${ALLOWED_CORS_ORIGINS:https://ibm-elm:9443,https://genoslc:8443,https://genoslc:443,https://genoslc,https://login.microsoftonline.com,https://localhost:4200,https://elmdemo.smartfacts.com:9443,https://localhost:9000,https://localhost:4200} known-context-roots: ${KNOWN-CONTEXT-ROOTS:https://genoslc2.smartfacts.com} trs-enabled: ${TRS_ENABLED:true} # TRS schedule # If TRS is enabled, IToolAdapter.getChanges will be called periodically to synchronize changes itooladaper-get-changes: refresh-rate-seconds: 60 initial-delay-seconds: 30 compact-rendering-cache: # type: "dynamic", "timeout", "disabled" # # dynamic: keeps all values indefinitely in the database until we see a change from itooladaper-get-changes # # timeout: keeps all values until timeout. default if trs is not enabled # # disabled: the cache is disabled (duh) type: "timeout" timeout-seconds: 86400 #1 day resource-shape-cache: # type: "dynamic", "timeout", "disabled" # # dynamic: keeps all values indefinitely in the database until we see a change from itooladaper-get-changes # # timeout: keeps all values until timeout. default if trs is not enabled # # disabled: the cache is disabled (duh) type: "timeout" timeout-seconds: 604800 #1 week # root context of the global configuration provider # IMPORTANT => we will only look for global configurations here global-configuration-provider: ${GLOBAL_CONFIGURATION_PROVIDER:https://ibm-elm:9443/gc} global-configuration-cache: # type: "dynamic", "timeout", "disabled" # # dynamic: keeps all values indefinitely (up to capacity), but scans the GC TRS for # changes and only evicts entries when they change. # **IMPORTANT** # TRS will be scanned with the technical user. For this to work # in IBM ELM a functional user id must be set with the associated # outgoing OAuth 1.0A consumer-key # # timeout: cached values are kept only until refresh-rate-seconds # # disabled: the cache is disabled (duh) type: "timeout" timeout-seconds: 86400 #1 day # these apply only when the cache is dynamic provider-trs-refresh-rate-seconds: 60 provider-trs-initial-delay-seconds: 120 # give it a moment to get everything working. # We may be running in a multiple JTS environment or without JTS at all (smartfacts) # link-validity-server: https://ibm-elm:9443/jts link-validity-server: ${LINK_VALIDITY_PROVIDER:https://ibm-elm:9443/jts} link-index: # What kind of link index are we using # type: "ibm-elm", "smartfacts", "none" type: "none" endpoint-uri: "https://ibm-elm:9443/ldx/sparql" oauth10a: active: true # token-expires-seconds: 120 realm-name: ${OAUTH10A_INBOUND_REALM_NAME:genoslc-example}