SW360 Configurations

SW360 Configurable Property Keys (Files and Database)

Introduction

SW360 configurations are divided into two main categories: Non-changeable (File-based) and Changeable (Database-backed).

Applicable Property Files:

  • sw360.properties (Core configurations)
  • couchdb.properties (CouchDB and Lucene connectivity)
  • orgmapping.properties (Organization mapping features)
  • couchdb-test.properties (CouchDB test purpose)
  • authorization/application.yml (Authorization server settings)
  • rest/application.yml (Resource server settings)

Database Configurations:

Most of the SW360-related properties (UI settings and backend features) are now moved to a database and are accessible via a REST endpoint. These are divided into two containers:

  • SW360_CONFIGURATION (Backend)
  • UI_CONFIGURATION (Frontend)

More details can be found in the Database Configurations section below.

SW360.properties (/etc/sw360/sw360.properties)

The sw360.properties file contains properties that are considered non-changeable via the UI and require a Tomcat restart to take effect after updating.

Property KeyDescriptionDefault
backend.urlBase URL for Thrifthttp://localhost:8080
MailUtil_hostSMTP server host address-
MailUtil_fromDefault sender address for system emails__No_Reply__@sw360.org
MailUtil_portSMTP server port25
MailUtil_enableStarttlsEnable STARTTLS for mail encryptionfalse
MailUtil_enableSslEnable SSL for mail encryptionfalse
MailUtil_isAuthenticationNecessaryWhether SMTP requires authenticationfalse
MailUtil_loginSMTP username-
MailUtil_passwordSMTP password-
MailUtil_enableDebugEnable debugging for mail operationsfalse
MailUtil_supportMailAddressSupport contact email address-
defaultBeginHeader text template for system emails*** This is an automatically generated email...
defaultEndFooter text template for system emailsWith best regards...
unsubscribeNoticeBeforeUnsubscribe notice prefix*** If you do not wish to receive...
unsubscribeNoticeAfterUnsubscribe notice suffix. ***
svm.components.urlSVM: Components monitoring endpoint-
svm.actions.urlSVM: Actions monitoring endpoint-
svm.priorities.urlSVM: Priorities monitoring endpoint-
svm.components.vulnerabilities.urlSVM: Component vulnerabilities endpoint-
svm.vulnerabilities.urlSVM: Vulnerabilities detail endpoint-
svm.sw360.api.urlSVM: Base URL for SVM if not configuring individual SVM endpoints above-
schedule.svmsync.firstOffset.secondsTime offset for SVM sync job (seconds) since 00:003600
schedule.svmsync.interval.secondsInterval for SVM sync job (seconds)86400
schedule.svmmatch.firstOffset.secondsTime offset for SVM matching job (seconds) since 00:007200
schedule.svmmatch.interval.secondsInterval for SVM matching job (seconds)86400
schedule.svmlistupdate.interval.secondsInterval for SVM list updates (seconds)86400
schedule.trackingfeedback.firstOffset.secondsTime offset for tracking feedback (seconds) since 00:0010800
schedule.delete.attachment.firstOffset.secondsTime offset for attachment deletion (seconds) since 00:000
schedule.delete.attachment.interval.secondsInterval for attachment deletion (seconds)86400
schedule.department.firstOffset.secondsTime offset for department sync (seconds) since 00:000
schedule.department.interval.secondsInterval for department sync (seconds)3600
subjectFor* / textFor*Various mail notification subjects and body patterns-
enable.sw360.change.logEnable system-wide changelog writing to a file (in addition to CouchDB)false
sw360changelog.output.pathOutput path for the change log filesw360changelog/sw360changelog

couchdb.properties (/etc/sw360/couchdb.properties)

CouchDB and Lucene search configuration properties.

Property KeyDescriptionDefault
couchdb.urlBase URL of the CouchDB instancehttp://localhost:5984
couchdb.userDatabase auth username-
couchdb.passwordDatabase auth password-
couchdb.databaseMain SW360 project databasesw360db
couchdb.userdbDatabase for user profilessw360users
couchdb.attachmentsDatabase for file attachmentssw360attachments
couchdb.vulnerability_managementDatabase for vulnerability datasw360vm
lucenesearch.limitMaximum results for search queries25
lucenesearch.leading.wildcardAllow leading wildcards in searchfalse

orgmapping.properties (/etc/sw360/orgmapping.properties)

This configuration file is used to activate the sw360 orgmapping feature.

Property KeyDescriptionDefault
match.prefixEnable prefix matching for organization mappingfalse
enable.custom.mappingActivate custom organization mapping featuresfalse
mapping.<id>What to match
mapping.<id>.targetWhat to map to

couchdb-test.properties (/etc/sw360/couchdb-test.properties)

This file is used solely for the purpose of CouchDB database connectivity during testing.

Property KeyDescriptionDefault
couch_db_urlBase URL for test databasehttp://localhost:5984
couch_db_databaseTest database namedatahandlertestdb
couchdb.usernameDatabase auth username (test)-
couchdb.passwordDatabase auth password (test)-

authorization/application.yml (/etc/sw360/authorization/application.yml)

The Authorization Server handles OAuth2 tokens and client credentials.

server:
  port: 8090

couchdb:
  url: http://localhost:5984
  database: sw360oauthclients
  username: sw360
  password: sw360fossie

jwt:
  secretkey: sw360SecretKey
  auth:
    converter:
      principle-attribute: email

spring:
  jackson:
    serialization:
      indent_output: true
  main:
    allow-circular-references: true

sw360:
  cors:
    allowed-origin: ${SW360_CORS_ALLOWED_ORIGIN:#{null}}

security:
  customheader:
    headername:
      enabled: false
      intermediateauthstore: custom-header-auth-marker
      email: authenticated-email
      extid: authenticated-extid
  oauth2:
    resource:
      id: sw360-REST-API
  accesstoken:
    validity: 30
logging:
  level:
    org.springframework.security: DEBUG

rest/application.yml (/etc/sw360/rest/application.yml)

The Resource Server provides the SW360 REST API.

server:
  servlet:
    context-path: /

management:
  endpoints:
    web:
      base-path: /
      exposure:
        include: health,info
      path-mapping:
        health: /api/health
        info: /api/info
  endpoint:
    health:
      show-details: always
      enabled: true
    info:
      enabled: true
  security:
    enabled: true
  health:
    diskspace:
      enabled: true    # Disable to hide sensitive system information
    ping:
      enabled: true
    ssl:
      enabled: false   # Disabled as not used

spring:
  profiles:
    active: SECURITY_MOCK
  application:
    name: resource
  servlet:
    multipart:
      max-file-size: 500MB
      max-request-size: 600MB
  security:
    oauth2:
      resourceserver:
        jwt:
          issuer-uri: http://localhost:8080/authorization/oauth2/jwks
          jwk-set-uri: http://localhost:8080/authorization/oauth2/jwks

#logging:
#  level:
#    org.springframework.security: DEBUG
#    org.springframework.security.oauth2: DEBUG
#    org.springframework.security.oauth2.provider.endpoint: DEBUG
#    org.springframework.security.oauth2.provider.error: DEBUG
#    org.springframework.security.oauth2.provider.token: DEBUG
#    org.springframework.security.oauth2.provider.token.store: DEBUG
#    org.springframework.security.oauth2.provider.token.store.jwk: DEBUG

jwt:
  auth:
    converter:
      resource-id: sw360-rest-api
      principle-attribute: email

sw360:
  thrift-server-url: ${SW360_THRIFT_SERVER_URL:http://localhost:8080}
  base-url: ${SW360_BASE_URL:http://localhost:8080}
  test-user-id: admin@sw360.org
  test-user-password: 12345
  couchdb-url: ${SW360_COUCHDB_URL:http://localhost:5984}
  cors:
    allowed-origin: ${SW360_CORS_ALLOWED_ORIGIN:#{null}}

blacklist:
  sw360:
    rest:
      api:
        endpoints:

springdoc:
  api-docs:
    enabled: true
    path: /v3/api-docs
    security:
      oauth2:
        enabled: true
  swagger-ui:
    enabled: true
    path: /index.html
    security:
      oauth2:
        enabled: true
  default-consumes-media-type: application/json
  default-produces-media-type: application/hal+json

Database Configurations

A significant portion of SW360’s configuration is now stored in the database. These settings are dynamic and can be managed via REST API endpoints without requiring a full system restart in most cases.

The configurations are partitioned into two containers:

  1. SW360_CONFIGURATION: Backend and core logic settings.
  2. UI_CONFIGURATION: Frontend and UI-specific settings (categories, roles, platforms, etc.).

SW360 Container (Backend)

Property KeyDescriptionDefault Value
spdx.document.enabledThis configuration allow to turn ON/OFF SPDX document feature (SPDX Document Tab in release detail page)false
component.visibility.restriction.enabledEnable the component visibility restriction featurefalse
licenseinfo.spdxparser.use-license-info-from-filesUse license info from filestrue
mainline.state.enabled.for.userEnable editing of mainline state for userfalse
enable.attachment.store.to.file.systemAllows storing attachments in the file systemfalse
attachment.delete.no.of.daysDelete attachments after a specified number of days30
attachment.store.file.system.locationConfigure attachment storage location/var/lib/sw360/attachments
auto.set.ecc.statusEnable auto set ECC statusfalse
send.project.spreadsheet.export.to.mail.enabledEnable sending project spreadsheet export via mailfalse
send.component.spreadsheet.export.to.mail.enabledEnable sending component spreadsheet export via mailfalse
bulk.release.deleting.enabledEnable bulk release deleting featurefalse
disable.clearing.fossology.report.downloadDisable the ISR generation in fossology processfalse
rest.force.update.enabledEnable force update featurefalse
sbom.import.export.access.usergroupSBOM Import Export Access User GroupUSER
sw360.tool.nameThe tool name in exported CycloneDx SBOMsw360
sw360.tool.vendorThe tool vendor in exported CycloneDx SBOMeclipse
package.portlet.enabledEnable/disable the package management featuretrue
package.portlet.write.access.usergroupControl the write access user role for packagesUSER
admin.private.project.access.enabledAllow ADMIN users to access private resourcesfalse
release.sourcecodeurl.skip.domainsRegex for domains to skip URL check in Release Source Download URLgit(hub|lab).com
release.friendly.urlCreate URLs in Doc reportshttp://localhost:3000/...
combined.cli.parser.external.id.correlation.keyFind correlation key for combined CLI-
rest.apitoken.lengthConfigure the length of generated REST API tokens20
inherit.attachment.usagesInherit attachmentUsages of subproject by defaultfalse
vcs.hostsRepositoryURL class to handle VCS from SBOM[]
svm.notification.urlConfigure the SVM notification URL-
non.pkg.managed.comps.propProperties of non-package managed components while importing CDX SBOM-

UI Container (Frontend)

Property KeyDescriptionDefault Value (Snippet)
ui.clearing.teamsList of Clearing Teams for Projects["DEPT1", "DEPT2", "DEPT3"]
ui.clearing.team.unknown.enabledAllow ‘Unknown’ as Clearing Team in Projectsfalse
ui.component.categoriesList of Categories for Components["framework", "SDK", ...]
ui.component.externalkeysList of External Keys for Components["com.github.id", ...]
ui.custommap.component.rolesList of Additional Roles for Components["Committer", "Expert"]
ui.custommap.project.rolesList of Roles for Projects["Stakeholder", ...]
ui.custommap.release.rolesList of Custom Roles for Releases["Committer", "Expert"]
ui.custom_welcome_page_guidelineEnable or Disable Custom Welcome Page Guidelinesfalse
ui.domainsList of domains allowed for Projects["Embedded Software", ...]
ui.enable.add.license.info.to.release.buttonEnable ‘Add License Info to Release’ button in Release Viewtrue
ui.enable.security.vulnerability.monitoringAllow enabling Security Vulnerability Monitoring for Projectsfalse
ui.operating.systemsOperating Systems to display in Releases["Linux", "Windows", ...]
ui.org.eclipse.sw360.disable.clearing.request.for.project.groupList of Project Groups for which Clearing Requests are disabled["DEPT1", "DEPT2", "DEPT3"]
ui.programming.languagesList of programming languages to display in Releases["Java", "Python", "C++", ...]
ui.project.externalkeysList of External Keys for Projects["internal.id"]
ui.project.externalurlsList of External URLs for Projects["wiki", "issue-tracker"]
ui.project.tagList of Tags for Projects[]
ui.project.typeList of types to classify Projects["Product", "Service", ...]
ui.release.externalkeysList of External Keys for Releases["org.maven.id", ...]
ui.software.platformsList of Software Platforms to display in Releases["Java Platform", "Mono", ...]
ui.stateList of allowed Project lifecycle states["Active", "Phase out"]

Configuration Management via the UI

Since these configurations are accessible over REST API, they can be manipulated directly from the frontend.

From an ADMIN account, goto the frontend, under Admin section, you’d find Configurations tab, which allows you to manage these configurations. There will be 2 tabs for each container defined bellow which helps you mainpulate these configurations directly from the UI.

Configuration Management via REST API

Configurations can be retrieved and updated using the following endpoints provided by the Resource Server.

Retrieve Configurations

  • Get All Configurations: GET /configurations?changeable=<bool>
    • changeable=true: Returns keys managed in the database.
    • changeable=false: Returns keys defined in sw360.properties.
  • Get Container-Specific Configurations: GET /configurations/container/{configFor}?changeable=<bool>
    • configFor: SW360_CONFIGURATION (Backend) or UI_CONFIGURATION (Frontend).

Update Configurations

  • Update Database Configs: PATCH /configurations/container/{configFor}
    • Content-Type: application/json
    • Description: Updates one or more keys in the specified container.

Reloading Policy

  • Database Configs (Changeable): Updates are applied immediately upon successful PATCH operation.
  • File Configs (Non-changeable): Updates must be made by editing the sw360.properties file on the server. A Tomcat restart is required to load the new values.