Skip to content

Commit ec7a078

Browse files
Use spring to test oauth2 in messaging protocols
1 parent 17d706b commit ec7a078

File tree

4 files changed

+71
-2
lines changed

4 files changed

+71
-2
lines changed

selenium/bin/components/spring

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ ensure_spring() {
1111
}
1212
init_spring() {
1313
SPRING_CONFIG_DIR=${TEST_CONFIG_PATH}/spring
14-
SPRING_URL=${SPRING_URL:-OAUTH_PROVIDER_URL}
14+
SPRING_URL=${SPRING_URL:-$OAUTH_PROVIDER_URL}
1515

1616
print "> SPRING_CONFIG_DIR: ${SPRING_CONFIG_DIR}"
1717
print "> SPRING_URL: ${SPRING_URL}"
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1+
export SPRING_URL=https://spring:8443/
12
export OAUTH_PROVIDER_URL=https://spring:8443/
2-
export OAUTH_NODE_EXTRA_CA_CERTS=spring/ca_spring_certificate.pem
3+
export SPRING_CA_CERT=/config/ca_spring_certificate.pem
4+
export OAUTH_NODE_EXTRA_CA_CERTS=/config/ca_spring_certificate.pem
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
server:
2+
port: 8443
3+
ssl:
4+
bundle: spring-authorizationserver
5+
6+
spring:
7+
ssl:
8+
bundle:
9+
jks:
10+
spring-authorizationserver:
11+
key:
12+
alias: server-spring-tls
13+
password: foobar
14+
keystore:
15+
location: /config/server_spring.jks
16+
password: foobar
17+
type: PKCS12
18+
security:
19+
oauth2:
20+
users:
21+
- username: rabbit_admin
22+
password: rabbit_admin
23+
scopes:
24+
- openid
25+
- profile
26+
- rabbitmq.tag:administrator
27+
audiencies:
28+
- rabbitmq
29+
authorizationserver:
30+
client:
31+
mgt_api_client:
32+
registration:
33+
provider: spring
34+
client-id: mgt_api_client
35+
authorization-grant-types:
36+
- client_credentials
37+
client-authentication-methods:
38+
- client_secret_basic
39+
token-settings:
40+
access-token-format: reference
41+
scopes:
42+
- openid
43+
- profile
44+
- rabbitmq.tag:management
45+
client-name: mgt_api_client
46+
rabbitmq_client_code:
47+
registration:
48+
provider: spring
49+
client-id: rabbitmq_client_code
50+
require-proof-key: true
51+
authorization-grant-types:
52+
- authorization_code
53+
client-authentication-methods:
54+
- none
55+
redirect-uris:
56+
- "${RABBITMQ_SCHEME}://${RABBITMQ_HOST}${RABBITMQ_PATH}/js/oidc-oauth/login-callback.html"
57+
post-logout-redirect-uris:
58+
- "${RABBITMQ_SCHEME}://${RABBITMQ_HOST}${RABBITMQ_PATH}/"
59+
scopes:
60+
- openid
61+
- profile
62+
- rabbitmq.tag:administrator
63+
- rabbitmq.tag:management
64+
client-name: rabbitmq_client_code
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[ client_alt_names ]
2+
email.1 = rabbit_client@localhost
3+
URI.1 = rabbit_client_id_uri

0 commit comments

Comments
 (0)