Skip to content

Commit 7db9cc1

Browse files
committed
3.4.0: support client credentials grant type
depend on liboauth >= 1.6.0 Signed-off-by: Hans Zandbelt <[email protected]>
1 parent e3faa8e commit 7db9cc1

File tree

5 files changed

+28
-7
lines changed

5 files changed

+28
-7
lines changed

ChangeLog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
12/06/2023
2+
- add support for the client credentials grant type
3+
- depend on liboauth >= 1.6.0
4+
- release 3.4.0
5+
16
03/08/2023
27
- move repo to OpenIDC github organization
38

Makefile.am

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ lib_LTLIBRARIES = @[email protected]
2323
src/liboauth2-sts/src/sts.c \
2424
src/liboauth2-sts/src/wstrust.c \
2525
src/liboauth2-sts/src/ropc.c \
26+
src/liboauth2-sts/src/cc.c \
2627
src/liboauth2-sts/src/otx.c \
2728
2829
src/@PACKAGE_NAME@_modules.c

README.md

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ WS-Trust STS with HTTP Basic authentication and setting the target token in a co
1919
STSVariables $source_token $wst_target_token;
2020
2121
proxy_set_header Cookie STS_COOKIE=$wst_target_token;
22-
proxy_pass http://echo:8080/headers$is_args$args;
22+
proxy_pass http://echo:8080$is_args$args;
2323
}
2424
```
2525

@@ -33,7 +33,22 @@ OAuth 2.0 Resource Owner Password Credentials based Token Exchange with `client_
3333
STSVariables $source_token $ropc_target_token;
3434
3535
proxy_set_header Cookie STS_COOKIE=$ropc_target_token;
36-
proxy_pass http://echo:8080/headers$is_args$args;
36+
proxy_pass http://echo:8080$is_args$args;
37+
}
38+
```
39+
40+
OAuth 2.0 Client Credentials based token retrieval with `client_secret_basic` authentication.
41+
42+
```nginx
43+
location /sts/cc {
44+
STSExchange cc https://keycloak:8443/realms/master/protocol/openid-connect/token
45+
auth=client_secret_basic&client_id=cc_client&client_secret=mysecret&ssl_verify=false;
46+
47+
set $dummy_variable "notempty";
48+
STSVariables $dummy_variable $cc_target_token;
49+
50+
proxy_set_header Authorization "bearer $cc_target_token";
51+
proxy_pass http://echo:8080$is_args$args;
3752
}
3853
```
3954

@@ -47,7 +62,7 @@ OAuth 2.0 Token Exchange with `client_secret_basic` authentication.
4762
STSVariables $source_token $otx_target_token;
4863
4964
proxy_set_header Cookie STS_COOKIE=$otx_target_token;
50-
proxy_pass http://echo:8080/headers$is_args$args;
65+
proxy_pass http://echo:8080$is_args$args;
5166
}
5267
```
5368

configure.ac

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
AC_INIT([ngx_sts_module],[3.3.0],[[email protected]])
1+
AC_INIT([ngx_sts_module],[3.4.0],[[email protected]])
22

33
AM_INIT_AUTOMAKE([foreign no-define subdir-objects])
44
AC_CONFIG_MACRO_DIRS([m4])
@@ -25,11 +25,11 @@ AM_CONDITIONAL(HAVE_NGINX, [test x"$have_nginx" = "xyes"])
2525
AC_SUBST(NGINX_CFLAGS)
2626
AC_SUBST(NGINX_LIBS)
2727

28-
PKG_CHECK_MODULES(OAUTH2, [liboauth2 >= 1.4.5.2])
28+
PKG_CHECK_MODULES(OAUTH2, [liboauth2 >= 1.6.0])
2929
AC_SUBST(OAUTH2_CFLAGS)
3030
AC_SUBST(OAUTH2_LIBS)
3131

32-
PKG_CHECK_MODULES(OAUTH2_NGINX, [liboauth2_nginx >= 1.4.5.2])
32+
PKG_CHECK_MODULES(OAUTH2_NGINX, [liboauth2_nginx >= 1.6.0])
3333
AC_SUBST(OAUTH2_NGINX_CFLAGS)
3434
AC_SUBST(OAUTH2_NGINX_LIBS)
3535

0 commit comments

Comments
 (0)