Skip to content

Commit 14063dc

Browse files
First changes to test opaque tokens
1 parent 9413c70 commit 14063dc

File tree

5 files changed

+49
-3
lines changed

5 files changed

+49
-3
lines changed

selenium/authorization-server/src/main/resources/application.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ spring:
3737
client-authentication-methods:
3838
- client_secret_basic
3939
require-proof-key: true
40+
token-settings:
41+
access-token-format: reference
4042
scopes:
4143
- openid
4244
- profile
@@ -48,6 +50,7 @@ spring:
4850
client-id: rabbitmq_client_code
4951
authorization-grant-types:
5052
- authorization_code
53+
require-proof-key: true
5154
client-authentication-methods:
5255
- none
5356
redirect-uris:
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/usr/bin/env bash
2+
3+
SCRIPT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
4+
5+
TEST_CASES_PATH=/authnz-msg-protocols
6+
PROFILES="spring oauth-prodproducer auth-oauth-spring auth_backends-oauth-opaque "
7+
8+
source $SCRIPT/../../bin/suite_template
9+
runWith spring
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export OAUTH_PROVIDER_URL=https://spring:8443/
2+
export OAUTH_NODE_EXTRA_CA_CERTS=multi-oauth/devkeycloak/ca_certificate.pem
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
## RabbitMQ configuration with 2 oauth2 resources, rabbit_prod and rabbit_dev,
2+
## rather than a single resource_server_id
3+
## Also, each resource is owned by its own oauth provider, i.e. RabbitMQ is
4+
## accessed by users and clients from two different providers using their dedicated
5+
## resource_server_id.
6+
log.console.level = debug
7+
8+
auth_backends.1 = rabbit_auth_backend_oauth2
9+
10+
# Common auth_oauth2 settings for all resources
11+
auth_oauth2.preferred_username_claims.1 = preferred_username
12+
auth_oauth2.preferred_username_claims.2 = user_name
13+
auth_oauth2.preferred_username_claims.3 = email
14+
15+
## Resource servers hosted by this rabbitmq instance
16+
auth_oauth2.resource_servers.1.id = rabbitmq
17+
auth_oauth2.resource_servers.1.oauth_provider_id = spring
18+
19+
## Oauth providers
20+
auth_oauth2.oauth_providers.spring.issuer = ${SPRING_URL}
21+
auth_oauth2.oauth_providers.spring.https.cacertfile = ${SPRING_CA_CERT}
22+
auth_oauth2.oauth_providers.spring.https.verify = verify_peer
23+
auth_oauth2.oauth_providers.spring.https.hostname_verification = wildcard

selenium/test/oauth/spring/application.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,15 @@ spring:
1717
type: PKCS12
1818
security:
1919
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
2029
authorizationserver:
2130
client:
2231
mgt_api_client:
@@ -27,7 +36,8 @@ spring:
2736
- client_credentials
2837
client-authentication-methods:
2938
- client_secret_basic
30-
require-proof-key: true
39+
token-settings:
40+
access-token-format: reference
3141
scopes:
3242
- openid
3343
- profile
@@ -37,6 +47,7 @@ spring:
3747
registration:
3848
provider: spring
3949
client-id: rabbitmq_client_code
50+
require-proof-key: true
4051
authorization-grant-types:
4152
- authorization_code
4253
client-authentication-methods:
@@ -51,5 +62,3 @@ spring:
5162
- rabbitmq.tag:administrator
5263
- rabbitmq.tag:management
5364
client-name: rabbitmq_client_code
54-
55-

0 commit comments

Comments
 (0)