Skip to content

Commit

Permalink
re-introduce OIDCSessionMaxDuration 0 option; see #1252
Browse files Browse the repository at this point in the history
bump to 2.4.16.2dev

Signed-off-by: Hans Zandbelt <[email protected]>
  • Loading branch information
zandbelt committed Aug 28, 2024
1 parent abd3e49 commit 7b796ca
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 3 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
08/28/2024
- re-introduce OIDCSessionMaxDuration 0; see #1252
- bump to 2.4.16.2dev

08/26/2024
- fix parsing OIDCXForwardedHeaders; closes #1250; thanks @maltesmann
- release 2.4.16.1
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
AC_INIT([mod_auth_openidc],[2.4.16.1],[[email protected]])
AC_INIT([mod_auth_openidc],[2.4.16.2dev],[[email protected]])

AC_SUBST(NAMEVER, AC_PACKAGE_TARNAME()-AC_PACKAGE_VERSION())

Expand Down
24 changes: 22 additions & 2 deletions src/cfg/provider.c
Original file line number Diff line number Diff line change
Expand Up @@ -409,8 +409,28 @@ OIDC_PROVIDER_MEMBER_FUNCS_INT(idtoken_iat_slack, oidc_cfg_parse_int, OIDC_IDTOK
#define OIDC_SESSION_MAX_DURATION_MAX 3600 * 24 * 365
#define OIDC_DEFAULT_SESSION_MAX_DURATION 3600 * 8

OIDC_PROVIDER_MEMBER_FUNCS_INT(session_max_duration, oidc_cfg_parse_int, OIDC_SESSION_MAX_DURATION_MIN,
OIDC_SESSION_MAX_DURATION_MAX, OIDC_DEFAULT_SESSION_MAX_DURATION)
const char *oidc_cfg_provider_session_max_duration_set(apr_pool_t *pool, oidc_provider_t *provider, int arg) {
const char *rv = NULL;
if (arg != 0)
rv = oidc_cfg_parse_is_valid_int(pool, arg, OIDC_SESSION_MAX_DURATION_MIN,
OIDC_SESSION_MAX_DURATION_MAX);
if (rv == NULL)
provider->session_max_duration = arg;
else
provider->session_max_duration = OIDC_DEFAULT_SESSION_MAX_DURATION;
return rv;
}

const char *oidc_cmd_provider_session_max_duration_set(cmd_parms *cmd, void *ptr, const char *arg) {
oidc_cfg_t *cfg = (oidc_cfg_t *)ap_get_module_config(cmd->server->module_config, &auth_openidc_module);
int v = -1;
const char *rv = oidc_cfg_parse_int(cmd->pool, arg, &v);
if (rv == NULL)
rv = oidc_cfg_provider_session_max_duration_set(cmd->pool, cfg->provider, v);
return OIDC_CONFIG_DIR_RV(cmd, rv);
}

OIDC_PROVIDER_MEMBER_GET_INT_DEF(session_max_duration, int, OIDC_DEFAULT_SESSION_MAX_DURATION)

#define OIDC_JWKS_REFRESH_INTERVAL_MIN 300
#define OIDC_JWKS_REFRESH_INTERVAL_MAX 3600 * 24 * 365
Expand Down

0 comments on commit 7b796ca

Please sign in to comment.