Skip to content

Commit

Permalink
3.4.0: support client credentials grant type
Browse files Browse the repository at this point in the history
depend on liboauth >= 1.6.0

Signed-off-by: Hans Zandbelt <hans.zandbelt@openidc.com>
  • Loading branch information
zandbelt committed Dec 6, 2023
1 parent e3faa8e commit 7db9cc1
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 7 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
@@ -1,3 +1,8 @@
12/06/2023
- add support for the client credentials grant type
- depend on liboauth >= 1.6.0
- release 3.4.0

03/08/2023
- move repo to OpenIDC github organization

Expand Down
1 change: 1 addition & 0 deletions Makefile.am
Expand Up @@ -23,6 +23,7 @@ lib_LTLIBRARIES = @PACKAGE_NAME@.la
src/liboauth2-sts/src/sts.c \
src/liboauth2-sts/src/wstrust.c \
src/liboauth2-sts/src/ropc.c \
src/liboauth2-sts/src/cc.c \
src/liboauth2-sts/src/otx.c \
src/@PACKAGE_NAME@.c \
src/@PACKAGE_NAME@_modules.c
Expand Down
21 changes: 18 additions & 3 deletions README.md
Expand Up @@ -19,7 +19,7 @@ WS-Trust STS with HTTP Basic authentication and setting the target token in a co
STSVariables $source_token $wst_target_token;
proxy_set_header Cookie STS_COOKIE=$wst_target_token;
proxy_pass http://echo:8080/headers$is_args$args;
proxy_pass http://echo:8080$is_args$args;
}
```

Expand All @@ -33,7 +33,22 @@ OAuth 2.0 Resource Owner Password Credentials based Token Exchange with `client_
STSVariables $source_token $ropc_target_token;
proxy_set_header Cookie STS_COOKIE=$ropc_target_token;
proxy_pass http://echo:8080/headers$is_args$args;
proxy_pass http://echo:8080$is_args$args;
}
```

OAuth 2.0 Client Credentials based token retrieval with `client_secret_basic` authentication.

```nginx
location /sts/cc {
STSExchange cc https://keycloak:8443/realms/master/protocol/openid-connect/token
auth=client_secret_basic&client_id=cc_client&client_secret=mysecret&ssl_verify=false;
set $dummy_variable "notempty";
STSVariables $dummy_variable $cc_target_token;
proxy_set_header Authorization "bearer $cc_target_token";
proxy_pass http://echo:8080$is_args$args;
}
```

Expand All @@ -47,7 +62,7 @@ OAuth 2.0 Token Exchange with `client_secret_basic` authentication.
STSVariables $source_token $otx_target_token;
proxy_set_header Cookie STS_COOKIE=$otx_target_token;
proxy_pass http://echo:8080/headers$is_args$args;
proxy_pass http://echo:8080$is_args$args;
}
```

Expand Down
6 changes: 3 additions & 3 deletions configure.ac
@@ -1,4 +1,4 @@
AC_INIT([ngx_sts_module],[3.3.0],[hans.zandbelt@openidc.com])
AC_INIT([ngx_sts_module],[3.4.0],[hans.zandbelt@openidc.com])

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

PKG_CHECK_MODULES(OAUTH2, [liboauth2 >= 1.4.5.2])
PKG_CHECK_MODULES(OAUTH2, [liboauth2 >= 1.6.0])
AC_SUBST(OAUTH2_CFLAGS)
AC_SUBST(OAUTH2_LIBS)

PKG_CHECK_MODULES(OAUTH2_NGINX, [liboauth2_nginx >= 1.4.5.2])
PKG_CHECK_MODULES(OAUTH2_NGINX, [liboauth2_nginx >= 1.6.0])
AC_SUBST(OAUTH2_NGINX_CFLAGS)
AC_SUBST(OAUTH2_NGINX_LIBS)

Expand Down
2 changes: 1 addition & 1 deletion src/liboauth2-sts

0 comments on commit 7db9cc1

Please sign in to comment.