From 56380cd25ab98e1789079f9828572a3abd8ff841 Mon Sep 17 00:00:00 2001 From: nscuro Date: Thu, 21 Sep 2023 12:12:18 +0200 Subject: [PATCH 1/3] Add API key prefix `odt_` Overriding the default `alpine_` prefix. Support for API key prefixes was added in https://github.com/stevespringett/Alpine/pull/496 Signed-off-by: nscuro --- src/main/resources/application.properties | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 2e22e3f533..f6a08e40dd 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -30,6 +30,12 @@ alpine.data.directory=~/.dependency-track # Default is "/keys/secret.key". # alpine.secret.key.path=/var/run/secrets/secret.key +# Optional +# Defines the prefix to be used for API keys. A maximum prefix length of 251 +# characters is supported. +# The prefix may also be left empty. +alpine.api.key.prefix=odt_ + # Required # Defines the interval (in seconds) to log general heath information. # If value equals 0, watchdog logging will be disabled. From fc5d5d411dd0153daab8f5ee4466dfd198eb0d3b Mon Sep 17 00:00:00 2001 From: nscuro Date: Thu, 21 Sep 2023 12:16:11 +0200 Subject: [PATCH 2/3] Remove misleading configuration options Removes `alpine.enforce.authentication` and `alpine.enforce.authorization` from `application.properties` and documentation. Settings those values to `false` is not supported. Fixes #3043 Signed-off-by: nscuro --- docs/_docs/getting-started/configuration.md | 12 ------------ src/main/resources/application.properties | 13 ------------- 2 files changed, 25 deletions(-) diff --git a/docs/_docs/getting-started/configuration.md b/docs/_docs/getting-started/configuration.md index 2aa8413ede..8e6ee55d8c 100644 --- a/docs/_docs/getting-started/configuration.md +++ b/docs/_docs/getting-started/configuration.md @@ -162,18 +162,6 @@ alpine.database.pool.max.lifetime=600000 # DO NOT CHANGE UNLESS THERE IS A GOOD REASON TO. # alpine.datanucleus.cache.level2.type= -# Optional -# When authentication is enforced, API keys are required for automation, and -# the user interface will prevent anonymous access by prompting for login -# credentials. -alpine.enforce.authentication=true - -# Optional -# When authorization is enforced, team membership for both API keys and user -# accounts are restricted to what the team itself has access to. To enforce -# authorization, the enforce.authentication property (above) must be true. -alpine.enforce.authorization=true - # Required # Specifies the number of bcrypt rounds to use when hashing a users password. # The higher the number the more secure the password, at the expense of diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index f6a08e40dd..68a7d5da22 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -134,19 +134,6 @@ alpine.database.pool.max.lifetime=600000 # DO NOT CHANGE UNLESS THERE IS A GOOD REASON TO. # alpine.datanucleus.cache.level2.type= -# Optional -# When authentication is enforced, API keys are required for automation, -# and the user interface will prevent anonymous access by prompting for login -# credentials. -alpine.enforce.authentication=true - -# Optional -# When authorization is enforced, team membership for both API keys and -# user accounts are restricted to what the team itself has access to. -# To enforce authorization, the enforce.authentication property (above) -# must be true. -alpine.enforce.authorization=true - # Required # Specifies the number of bcrypt rounds to use when hashing a users password. # The higher the number the more secure the password, at the expense of From 3ade7d4ac8ee6eacc970a6bff8b5b5a43d5eab6a Mon Sep 17 00:00:00 2001 From: nscuro Date: Thu, 21 Sep 2023 12:16:51 +0200 Subject: [PATCH 3/3] Add `alpine.api.key.prefix` to documentation Signed-off-by: nscuro --- docs/_docs/getting-started/configuration.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/_docs/getting-started/configuration.md b/docs/_docs/getting-started/configuration.md index 8e6ee55d8c..bc98c6cffe 100644 --- a/docs/_docs/getting-started/configuration.md +++ b/docs/_docs/getting-started/configuration.md @@ -68,6 +68,12 @@ alpine.data.directory=~/.dependency-track # Default is "/keys/secret.key". # alpine.secret.key.path=/var/run/secrets/secret.key +# Optional +# Defines the prefix to be used for API keys. A maximum prefix length of 251 +# characters is supported. +# The prefix may also be left empty. +alpine.api.key.prefix=odt_ + # Required # Defines the interval (in seconds) to log general heath information. If value # equals 0, watchdog logging will be disabled.