This repository has been archived by the owner on Nov 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 216
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for reserved prefixes (#1227)
This allows operators of a keywhiz service to reserve secret names that begin with a specified prefix for a specified owner. For example, we can enforce that a secret beginning with `sp:` can only be created if the ownerName is `specialOwner`.
- Loading branch information
Showing
6 changed files
with
261 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
162 changes: 162 additions & 0 deletions
162
server/src/test/resources/configs/with-reserved-prefixes.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,162 @@ | ||
server: | ||
applicationConnectors: | ||
- type: resources-https | ||
port: 4445 | ||
keyStorePath: dev_and_test_keystore.p12 | ||
keyStorePassword: ponies | ||
keyStoreType: PKCS12 | ||
trustStorePath: dev_and_test_truststore.p12 | ||
trustStorePassword: ponies | ||
trustStoreType: PKCS12 | ||
wantClientAuth: true | ||
validateCerts: true | ||
validatePeers: true | ||
crlPath: dev_and_test.crl | ||
supportedProtocols: [TLSv1.2] | ||
supportedCipherSuites: | ||
- TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 | ||
- TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 | ||
- TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 | ||
- TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 | ||
- TLS_RSA_WITH_AES_128_CBC_SHA256 | ||
- TLS_RSA_WITH_AES_128_GCM_SHA256 | ||
- TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256 | ||
- TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256 | ||
- TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 | ||
- TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA | ||
- TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA | ||
- TLS_RSA_WITH_AES_128_CBC_SHA | ||
- TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA | ||
- TLS_ECDH_RSA_WITH_AES_128_CBC_SHA | ||
- TLS_DHE_RSA_WITH_AES_128_CBC_SHA | ||
adminConnectors: | ||
- type: http | ||
bindHost: localhost | ||
port: 8081 | ||
|
||
logging: | ||
appenders: | ||
- type: console | ||
|
||
environment: testing | ||
|
||
database: | ||
driverClass: com.mysql.cj.jdbc.Driver | ||
url: jdbc:mysql://address=(host=localhost)(%custom_mysql_port%)(useUnicode=true)(characterEncoding=utf8)/keywhizdb_test | ||
user: root | ||
properties: | ||
charSet: UTF-8 | ||
initialSize: 2 | ||
minSize: 2 | ||
maxSize: 2 | ||
# There is explicitly no password. Do not uncomment. | ||
# password: | ||
|
||
readonlyDatabase: | ||
driverClass: com.mysql.cj.jdbc.Driver | ||
url: jdbc:mysql://address=(host=localhost)(%custom_mysql_port%)(useUnicode=true)(characterEncoding=utf8)/keywhizdb_test | ||
user: root | ||
properties: | ||
charSet: UTF-8 | ||
readOnlyByDefault: true | ||
initialSize: 1 | ||
minSize: 1 | ||
maxSize: 1 | ||
# There is explicitly no password. Do not uncomment. | ||
# password: | ||
|
||
migrationsDir: | ||
db/mysql/migration | ||
|
||
statusCacheExpiry: PT3S | ||
|
||
backupExportKeys: | ||
test: | | ||
-----BEGIN PGP PUBLIC K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7AH4CVH51rTWi4MFOBYy/LopA | ||
pjVkvUV7XB8oxsBAkjW4DRPFs8EpxvjRNCWFtGXqRYQ5LqGMgi2vnwG8py3uRvsd | ||
EuOSrLrAPaUbk42SHyg= | ||
=bG4m | ||
-----END PGP PUBLIC KEY BLOCK----- | ||
userAuth: | ||
type: bcrypt | ||
|
||
# Base64 of "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" | ||
cookieKey: QUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUE= | ||
|
||
sessionCookie: | ||
name: session | ||
path: /admin | ||
|
||
contentKeyStore: | ||
path: derivation.jceks | ||
type: JCEKS | ||
password: CHANGE | ||
alias: basekey | ||
|
||
rowHmacCheck: enforced | ||
|
||
flywaySchemaTable: schema_version | ||
|
||
clientAuthConfig: | ||
xfcc: | ||
- port: 4446 | ||
allowedClientNames: [] | ||
allowedSpiffeIds: [] | ||
type: | ||
useCommonName: true | ||
useSpiffeId: true | ||
createMissingClients: true | ||
|
||
reservedPrefixes: | ||
reservedOwner: "reserved-prefix:" | ||
anotherOwner: "reserved-prefix:extra:" | ||
noColonInPrefix: "abc" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters