-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixes #48 add client key/trust stores and supportClient flag
- Loading branch information
Showing
7 changed files
with
112 additions
and
11 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
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
-94 Bytes
(96%)
light-graphql-4j/src/main/resources/binaries/server.keystore
Binary file not shown.
56 changes: 56 additions & 0 deletions
56
light-graphql-4j/src/main/resources/templates/graphql/clientYml.rocker.raw
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,56 @@ | ||
--- | ||
sync: | ||
maxConnectionTotal: 100 | ||
maxConnectionPerRoute: 10 | ||
routes: | ||
api.google.com: 20 | ||
api.facebook.com: 10 | ||
timeout: 10000 | ||
keepAlive: 15000 | ||
async: | ||
maxConnectionTotal: 100 | ||
maxConnectionPerRoute: 10 | ||
routes: | ||
api.google.com: 20 | ||
api.facebook.com: 10 | ||
reactor: | ||
ioThreadCount: 1 | ||
connectTimeout: 10000 | ||
soTimeout: 10000 | ||
timeout: 10000 | ||
keepAlive: 15000 | ||
tls: | ||
# if the server is using self-signed certificate, this need to be false. If true, you have to use CA signed certificate | ||
# or load truststore that contains the self-signed cretificate. | ||
verifyHostname: true | ||
# trust store contains certifictes that server needs. Enable if tls is used. | ||
loadTrustStore: true | ||
# trust store location can be specified here or system properties javax.net.ssl.trustStore and password javax.net.ssl.trustStorePassword | ||
trustStore: tls/client.truststore | ||
# key store contains client key and it should be loaded if two-way ssl is uesed. | ||
loadKeyStore: false | ||
# key store location | ||
keyStore: tls/client.keystore | ||
oauth: | ||
tokenRenewBeforeExpired: 600000 | ||
expiredRefreshRetryDelay: 5000 | ||
earlyRefreshRetryDelay: 30000 | ||
# token server url. The default port number for token service is 6882. | ||
server_url: http://localhost:6882 | ||
authorization_code: | ||
# token endpoint for authorization code grant | ||
uri: "/oauth2/token" | ||
# client_id for authorization code grant flow. client_secret is in secret.yml | ||
client_id: 3798d583-275c-47d7-bf46-a3c436846336 | ||
redirect_uri: https://localhost:8080/authorization_code | ||
scope: | ||
- customer.r | ||
- customer.w | ||
client_credentials: | ||
# token endpoint for client credentials grant | ||
uri: "/oauth2/token" | ||
# client_id for client credentials grant flow. client_secret is in secret.yml | ||
client_id: 6e9d1db3-2feb-4c1f-a5ad-9e93ae8ca59d | ||
scope: | ||
- account.r | ||
- account.w |
35 changes: 27 additions & 8 deletions
35
light-graphql-4j/src/main/resources/templates/graphql/secretYml.rocker.raw
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 |
---|---|---|
@@ -1,16 +1,35 @@ | ||
# This file contains all the secrets for the server in order to manage and | ||
# secure all of them in the same place. In Kubernetes, this file will be | ||
# mapped to Secrets and all other config files will be mapped to mapConfig | ||
# This file contains all the secrets for the server and client in order to manage and | ||
# secure all of them in the same place. In Kubernetes, this file will be mapped to | ||
# Secrets and all other config files will be mapped to mapConfig | ||
|
||
--- | ||
|
||
# Sever section | ||
|
||
# Key store password, the path of keystore is defined in server.yml | ||
serverKeystorePass: password | ||
|
||
# Key password, the key is in keystore | ||
serverKeyPass: password | ||
|
||
# Trust store password, the path of truststore is defined in server.yml | ||
serverTruststorePass: password | ||
|
||
|
||
# Client section | ||
|
||
# Key store password, the path of keystore is defined in server.yml | ||
keystorePass: secret | ||
clientKeystorePass: password | ||
|
||
# Key password, the key is in keystore | ||
keyPass: secret | ||
clientKeyPass: password | ||
|
||
# Trust store password, the path of truststore is defined in server.yml | ||
truststorePass: password | ||
clientTruststorePass: password | ||
|
||
# Authorization code client secret for OAuth2 server | ||
authorizationCodeClientSecret: f6h1FTI8Q3-7UScPZDzfXA | ||
|
||
# Client credentials client secret for OAuth2 server | ||
clientCredentialsClientSecret: f6h1FTI8Q3-7UScPZDzfXA | ||
|
||
# Client secret for OAuth2 server | ||
clientSecret: f6h1FTI8Q3-7UScPZDzfXA |
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