Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update multi-backend branch and resolve merge conflicts. #1

Closed
wants to merge 129 commits into from

Conversation

studersi
Copy link

This pull request resolves the merge conflicts of the following pull request: apereo#36.

Josh Hoyt and others added 30 commits September 20, 2011 13:41
<https://issues.jasig.org/browse/MAS-60>:

* Use ap_getword_conf to tokenize the Require directive. This means
  that attribute specifications can use any character (including
  whitespace). For example:

    Require cas-attribute "last-name:de Soto"

* Pass a reference to the struct of attributes that's parsed out of
  the SAML response in order to do authorization rather than using
  attributes serialized into a notes field. This eliminates ambiguity
  due to serialization, as well as being more efficient.

* Factor out the routine that evaluates an attribute specification
  against the set of attributes. This improves readability as well as
  testability. Also, be explicit about exactly what will match an
  attribute specification, and the behavior in the face of ambiguity.
…tributes

The parameter was incorrectly set to the request_rec pointer itself
rather than the request_config field of the request. Depending on
Apache's configuration, this resulted in different parts of the
request structure being overwritten with the attribute pointer. In
many cases, it worked correctly by accident. This change correctly
uses the request_config conf_vector for ap_get/set_module_config.

In addition to that change, cas_get_attributes also works better in a
subrequest: if no attributes are found in the subrequest, it will look
in the parent request for attributes.
<https://issues.jasig.org/browse/MAS-60>:

* Use ap_getword_conf to tokenize the Require directive. This means
  that attribute specifications can use any character (including
  whitespace). For example:

    Require cas-attribute "last-name:de Soto"

* Pass a reference to the struct of attributes that's parsed out of
  the SAML response in order to do authorization rather than using
  attributes serialized into a notes field. This eliminates ambiguity
  due to serialization, as well as being more efficient.

* Factor out the routine that evaluates an attribute specification
  against the set of attributes. This improves readability as well as
  testability. Also, be explicit about exactly what will match an
  attribute specification, and the behavior in the face of ambiguity.
…tributes

The parameter was incorrectly set to the request_rec pointer itself
rather than the request_config field of the request. Depending on
Apache's configuration, this resulted in different parts of the
request structure being overwritten with the attribute pointer. In
many cases, it worked correctly by accident. This change correctly
uses the request_config conf_vector for ap_get/set_module_config.

In addition to that change, cas_get_attributes also works better in a
subrequest: if no attributes are found in the subrequest, it will look
in the parent request for attributes.
…n the

config file, but no actual attributes are specified.

had to add <openssl/crypto.h> in includes to get module to compile on 64-bit
system (regression testing needed - did I break 32-bit?)

started adding hooks for unit testing cas-attribute parsing and enforcement
…h_cas into folini-authz

Conflicts:
	README
	src/mod_auth_cas.c
	src/mod_auth_cas.h
…g-free GCC compiles.

Had to pull in some attribute parsing code from apache to get authz unit tests to go through.
antsar and others added 28 commits January 6, 2016 20:29
Setting the CASTimeout option to 0 should allow a non-idle session to not expire. Instead, it initiated an endless redirect loop to the CAS server and back. This happened because the CAS cache file was instantly deleted upon being created. This commit prevents the cache from being deleted when CASTimeout is set to 0.
This allows "Satisy Any" and the 2.4-style multiple Require(Any|All)
lines to work properly.

The Apache 2.4 docs say the following about ap_hook_check_authn():

This hook is used to analyze the request headers, authenticate the user,
and set the user information in the request record (r->user and
r->ap_auth_type). This hook is only run when Apache determines that
authentication/authorization is required for this resource (as
determined by the 'Require' directive). It runs after the access_checker
hook, and before the auth_checker hook. This hook should be registered
with ap_hook_check_authn(). If "Satisfy any" is in effect, this hook may
be skipped.

AUTHZ_DENIED_NO_USER needs to be returned in cas_check_authorization()
in case the user hasn't been authenticated yet.

Add stub for ap_hook_check_authn().
Use ap_hook_check_authn() instead of ap_hook_check_access().
Add note that CASAuthoritative isn't available when using Apache 2.4.
Issue apereo#106. Allow per-module loglevel configuration.
Fixed redirect loop with CASTimeout=0
[Feature] Support CASv2 Attributes
CASv2 attributes may need to be scrubbed now.
Following the approach for converting //Response/Assertion/AuthenticationStatement/AuthenticationMethod in the SAML 1 response to a CAS attribute, this will convert //Response/Assertion/AuthenticationStatement/AuthenticationInstant as well.
…attr

Add AuthenticationInstant as CAS attribute in samlValidate
CASValidateSAML is defined in the RSRC_CONF context.
'int flags' was added to the end of the module_struct.
Move CASValidateSAML to "Valid Server/VirtualHost Directives".
Also add this logging for SAML attributes.
It's no longer SAML-only; also clarify SAML vs. CAS protocols where
appropriate.

Note that attributes are not set in HTTP headers unless CASAuthNHeader
is set.

Mention that Apache 2.4 drops headers containing underscores.
log attributes at debug; improve attribute documentation
# Conflicts:
#	src/mod_auth_cas.c
#	src/mod_auth_cas.h
@studersi
Copy link
Author

studersi commented Oct 1, 2018

@bnoordhuis prefers that I create a pull request that directly targets the official project instead of his fork.

@studersi studersi closed this Oct 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.