[cpp-sp] branch maint-3 updated: SSPCPP-1012 - Add deprecation warnings where required

Scott Cantor cantor.2 at osu.edu
Tue Jul 29 19:43:26 UTC 2025


This is an automated email from the git hooks/post-receive script.

scantor pushed a commit to branch maint-3
in repository cpp-sp.

View the commit online:
http://git.shibboleth.net/view/?p=cpp-sp.git;a=commit;h=4ae1fd36acdedb7359054a92fcc0f7886ad78f50

The following commit(s) were added to refs/heads/maint-3 by this push:
     new 4ae1fd36 SSPCPP-1012 - Add deprecation warnings where required
4ae1fd36 is described below

commit 4ae1fd36acdedb7359054a92fcc0f7886ad78f50
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Tue Jul 29 15:42:20 2025 -0400

    SSPCPP-1012 - Add deprecation warnings where required
    
    https://shibboleth.atlassian.net/browse/SSPCPP-1012
    
    Add deprecations to legacy Apache commands with existing replacements.
---
 apache/mod_shib.cpp | 45 +++++++++++++++++++++++++++++++++++++++------
 1 file changed, 39 insertions(+), 6 deletions(-)

diff --git a/apache/mod_shib.cpp b/apache/mod_shib.cpp
index 1a1f2543..8c4991f4 100644
--- a/apache/mod_shib.cpp
+++ b/apache/mod_shib.cpp
@@ -2262,6 +2262,39 @@ extern "C" void shib_register_hooks (apr_pool_t *p)
 #endif
 }
 
+// Deprecation wrapers for commands
+
+extern "C" const char* deprecated_set_flag_slot(cmd_parms *cmd, void *struct_ptr, int arg)
+{
+    if (!strcasecmp(cmd->cmd->name, "ShibRequireSession")) {
+        ap_log_error(APLOG_MARK, APLOG_WARNING|APLOG_NOERRNO, 0, cmd->server,
+            "DEPRECATED: '%s On|Off' replaced with 'ShibRequestSetting requireSession 1|0'", cmd->cmd->name);
+    }
+    else if (!strcasecmp(cmd->cmd->name, "ShibExportAssertion")) {
+        ap_log_error(APLOG_MARK, APLOG_WARNING|APLOG_NOERRNO, 0, cmd->server,
+            "DEPRECATED: '%s' will be removed in a future version", cmd->cmd->name);
+    }
+    return ap_set_flag_slot(cmd, struct_ptr, arg);
+}
+
+extern "C" const char* deprecated_set_string_slot(cmd_parms *cmd, void *struct_ptr, const char* arg)
+{
+    if (!strcasecmp(cmd->cmd->name, "ShibApplicationId")) {
+        ap_log_error(APLOG_MARK, APLOG_WARNING|APLOG_NOERRNO, 0, cmd->server,
+            "DEPRECATED: '%s` replaced with 'ShibRequestSetting applicationId'", cmd->cmd->name);
+    }
+    else if (!strcasecmp(cmd->cmd->name, "ShibRedirectToSSL")) {
+        ap_log_error(APLOG_MARK, APLOG_WARNING|APLOG_NOERRNO, 0, cmd->server,
+            "DEPRECATED: '%s` replaced with 'ShibRequestSetting redirectToSSL'", cmd->cmd->name);
+    }
+    else if (!strcasecmp(cmd->cmd->name, "ShibRequireSessionWith")) {
+        ap_log_error(APLOG_MARK, APLOG_WARNING|APLOG_NOERRNO, 0, cmd->server,
+            "DEPRECATED: '%s' will be removed in a future version", cmd->cmd->name);
+    }
+    return ap_set_string_slot(cmd, struct_ptr, arg);
+}
+
+
 // SHIB Module commands
 
 extern "C" {
@@ -2287,22 +2320,22 @@ static command_rec shib_cmds[] = {
     AP_INIT_FLAG("ShibDisable", (config_fn_t)ap_set_flag_slot,
         (void *) offsetof (shib_dir_config, bOff),
         OR_AUTHCFG, "Disable all Shib module activity here to save processing effort"),
-    AP_INIT_TAKE1("ShibApplicationId", (config_fn_t)ap_set_string_slot,
+    AP_INIT_TAKE1("ShibApplicationId", (config_fn_t)deprecated_set_string_slot,
         (void *) offsetof (shib_dir_config, szApplicationId),
         OR_AUTHCFG, "(DEPRECATED) Set Shibboleth applicationId property for content"),
     AP_INIT_FLAG("ShibBasicHijack", (config_fn_t)ap_set_flag_slot,
         (void *) offsetof (shib_dir_config, bBasicHijack),
-        OR_AUTHCFG, "(DEPRECATED) Respond to AuthType Basic and convert to shibboleth"),
-    AP_INIT_FLAG("ShibRequireSession", (config_fn_t)ap_set_flag_slot,
+        OR_AUTHCFG, "Respond to AuthType Basic and convert to shibboleth"),
+    AP_INIT_FLAG("ShibRequireSession", (config_fn_t)deprecated_set_flag_slot,
         (void *) offsetof (shib_dir_config, bRequireSession),
         OR_AUTHCFG, "(DEPRECATED) Initiates a new session if one does not exist"),
-    AP_INIT_TAKE1("ShibRequireSessionWith", (config_fn_t)ap_set_string_slot,
+    AP_INIT_TAKE1("ShibRequireSessionWith", (config_fn_t)deprecated_set_string_slot,
         (void *) offsetof (shib_dir_config, szRequireWith),
         OR_AUTHCFG, "(DEPRECATED) Initiates a new session if one does not exist using a specific SessionInitiator"),
-    AP_INIT_FLAG("ShibExportAssertion", (config_fn_t)ap_set_flag_slot,
+    AP_INIT_FLAG("ShibExportAssertion", (config_fn_t)deprecated_set_flag_slot,
         (void *) offsetof (shib_dir_config, bExportAssertion),
         OR_AUTHCFG, "(DEPRECATED) Export SAML attribute assertion(s) to Shib-Attributes header"),
-    AP_INIT_TAKE1("ShibRedirectToSSL", (config_fn_t)ap_set_string_slot,
+    AP_INIT_TAKE1("ShibRedirectToSSL", (config_fn_t)deprecated_set_string_slot,
         (void *) offsetof (shib_dir_config, szRedirectToSSL),
         OR_AUTHCFG, "(DEPRECATED) Redirect non-SSL requests to designated port"),
 #ifdef SHIB_APACHE_24

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list