Commit Graph

174 Commits

Author SHA1 Message Date
olavmrk 380377d5d3 Version 0.6.0-rc1.
git-svn-id: https://modmellon.googlecode.com/svn/trunk@190 a716ebb1-153a-0410-b759-cfb97c6a1b53
2013-03-06 12:54:31 +00:00
olavmrk 5698151f02 Update NEWS file for version 0.6.0.
git-svn-id: https://modmellon.googlecode.com/svn/trunk@189 a716ebb1-153a-0410-b759-cfb97c6a1b53
2013-03-06 12:54:28 +00:00
olavmrk fd100fdf84 Remove TODO file.
This file has been replaced with the issue tracker, so remove it.

git-svn-id: https://modmellon.googlecode.com/svn/trunk@188 a716ebb1-153a-0410-b759-cfb97c6a1b53
2013-03-06 12:54:24 +00:00
olavmrk 5b27947bbe Remove debian-directory.
The Debian build files will be moving to a separate repository.

git-svn-id: https://modmellon.googlecode.com/svn/trunk@187 a716ebb1-153a-0410-b759-cfb97c6a1b53
2013-03-06 12:54:18 +00:00
olavmrk 07f7c37cca Use discovery service with "login" endpoint.
Accessing the "login"-endpoint with multiple IdPs configured would
bypass the discovery service. This patch changes the behaviour so
that we send a discovery service request instead.

This breaks backwardscompatibility slightly, but hopefully it should
not be a problem.

This fixes issue 13: https://code.google.com/p/modmellon/issues/detail?id=13

git-svn-id: https://modmellon.googlecode.com/svn/trunk@186 a716ebb1-153a-0410-b759-cfb97c6a1b53
2013-03-06 12:54:14 +00:00
olavmrk f01342d019 Fix incorrect use of const-keyword in login handler.
This doesn't fix any bugs, it just makes the code cleaner.

git-svn-id: https://modmellon.googlecode.com/svn/trunk@185 a716ebb1-153a-0410-b759-cfb97c6a1b53
2013-03-06 12:54:10 +00:00
olavmrk e87049bac9 Do not mark a session as logged in before all processing is completed.
If we mark the session as logged in before all processing is completed,
a failure during login processing (e.g. too big attribute values) can
cause a user to receive a "half-authenticated" session.

This patch changes the code so that the last task before releaseing the
session is to mark it as logged in.

git-svn-id: https://modmellon.googlecode.com/svn/trunk@184 a716ebb1-153a-0410-b759-cfb97c6a1b53
2013-03-06 12:54:06 +00:00
olavmrk 2b12f238fa Avoid locking and unlocking the session multiple times during login.
We currently release the session lock only to grab it again a few
instructions later. This patch changes this so that we initialize
the session in one operation.

git-svn-id: https://modmellon.googlecode.com/svn/trunk@183 a716ebb1-153a-0410-b759-cfb97c6a1b53
2013-03-06 12:54:03 +00:00
olavmrk b3c1478d94 Fix missing session release in error path during login.
We had forgotten to release the session object in one of the error paths
during login. This could result in us hanging onto the session mutex after
the request has finished, this deadlocking the server. This patch fixes
that error.

git-svn-id: https://modmellon.googlecode.com/svn/trunk@182 a716ebb1-153a-0410-b759-cfb97c6a1b53
2013-03-06 12:53:59 +00:00
olavmrk 540d7e4eea Rename am_generate_session_id() to am_generate_id().
Since this function is used for both generating session IDs and for
generating POST data identifiers for POST replay, it should have a
generic name.

git-svn-id: https://modmellon.googlecode.com/svn/trunk@181 a716ebb1-153a-0410-b759-cfb97c6a1b53
2013-03-06 12:53:54 +00:00
olavmrk 1ecef88f75 Handle relative paths in configuration.
This patch changes all configuration options that receive paths to files
to convert them to an absolute path. This ensures that relative paths
work correctly after the server changes the current working directory
during session initialization.

Thanks to Jeroen De Ridder for reporting this bug and suggesting a fix!

git-svn-id: https://modmellon.googlecode.com/svn/trunk@180 a716ebb1-153a-0410-b759-cfb97c6a1b53
2013-03-06 12:53:51 +00:00
olavmrk fc3c4a556e Document the POST replay functionality.
git-svn-id: https://modmellon.googlecode.com/svn/trunk@179 a716ebb1-153a-0410-b759-cfb97c6a1b53
2013-03-06 12:53:47 +00:00
olavmrk ddee564644 Disable automatic creation of MellonPostDirectory.
Now that the POST replay functionality has been disabled by default,
we can force the administrator to create this directory manually. This
saves us from worrying about temp file/directory vulnerabilities.

git-svn-id: https://modmellon.googlecode.com/svn/trunk@178 a716ebb1-153a-0410-b759-cfb97c6a1b53
2013-03-06 12:53:42 +00:00
olavmrk 81cf686843 Disable replay of POST request by default.
Since we are going to disable autocreation of the POST data directory,
we will need to disable POST replay by default. This patch adds the
MellonPostReplay option, which can be used to enable and disable the
POST replay functionality on a per-location basis.

git-svn-id: https://modmellon.googlecode.com/svn/trunk@177 a716ebb1-153a-0410-b759-cfb97c6a1b53
2013-03-06 12:53:38 +00:00
olavmrk 5ba60b7ad9 Change lock file to be stored in /var/run.
The current code defaults to storing the lock file in /tmp. This patch
changes the default to /var/run, which is where such files belong.

Note that this lock file is only required on some platforms.

git-svn-id: https://modmellon.googlecode.com/svn/trunk@176 a716ebb1-153a-0410-b759-cfb97c6a1b53
2013-03-06 12:53:34 +00:00
olavmrk 71082f1563 Update license to reflect that we are linking to the OpenSSL library.
git-svn-id: https://modmellon.googlecode.com/svn/trunk@175 a716ebb1-153a-0410-b759-cfb97c6a1b53
2013-03-06 12:53:30 +00:00
olavmrk f564affc4a Remove duplicate endpoint handlers.
The "metadata" and "repost" handlers were tested twice in the
endpoint handler. This patch removes the last occurence, since they
are never reached.

git-svn-id: https://modmellon.googlecode.com/svn/trunk@174 a716ebb1-153a-0410-b759-cfb97c6a1b53
2013-03-06 12:53:26 +00:00
olavmrk 313992258e Add Benjamin Dauvergne to contributors section in README.
git-svn-id: https://modmellon.googlecode.com/svn/trunk@173 a716ebb1-153a-0410-b759-cfb97c6a1b53
2013-03-06 12:53:22 +00:00
olavmrk 0710259d6a Fix SP-initiated logout.
We need to restore the profile state when creating a logout request,
so that Lasso has the information it requires for logging out.

If we do not do this, every logout "fail" with the log message:

    User attempted to initiate logout without being loggged in.

git-svn-id: https://modmellon.googlecode.com/svn/trunk@172 a716ebb1-153a-0410-b759-cfb97c6a1b53
2013-03-06 12:53:17 +00:00
benjamin.dauvergne 4abc14dbdd add implementation of g_hash_table_get_keys to compile under Centos 5
git-svn-id: https://modmellon.googlecode.com/svn/trunk@171 a716ebb1-153a-0410-b759-cfb97c6a1b53
2012-10-10 10:35:15 +00:00
benjamin.dauvergne c02a50b54f fix indentation in configuration example in README
git-svn-id: https://modmellon.googlecode.com/svn/trunk@170 a716ebb1-153a-0410-b759-cfb97c6a1b53
2012-10-09 08:41:59 +00:00
benjamin.dauvergne 2ae6ed1041 replace all assignment to r->content_type by calls to ap_set_content_type
git-svn-id: https://modmellon.googlecode.com/svn/trunk@169 a716ebb1-153a-0410-b759-cfb97c6a1b53
2012-10-09 08:41:54 +00:00
benjamin.dauvergne 0e35cd2063 Add configuration directive MellonDoNotVerifyLogoutSignature
This directive allows to list IdP entityID for which the signature of
their logout request must not be verified.

git-svn-id: https://modmellon.googlecode.com/svn/trunk@168 a716ebb1-153a-0410-b759-cfb97c6a1b53
2012-10-09 08:41:45 +00:00
benjamin.dauvergne 9081ebffab Add a local logout only possibility when IdP does not support logout
Handle the case of an IdP not handling SLO as a normal situation, not an
internal error, so that the HTTP flow can get back to the ReturnURL
without interruption.

git-svn-id: https://modmellon.googlecode.com/svn/trunk@167 a716ebb1-153a-0410-b759-cfb97c6a1b53
2012-10-09 08:41:40 +00:00
benjamin.dauvergne c9ad6f9822 rework logout handler to really handle SOAP requests
- Change am_restore_lasso_profile_state to take an am_cache_entry_t*
  as parameter instead of looking at the current session (there is no
  session when you receive a SOAP request),
- Restore the profile state after parsing the Logout request not before,
- Always lookup the session through the NameID, as nothing in the spec
  forbid out-of-browser HTTP-Redirect requests,
- Use the new helper function to return the LogoutResponse.

git-svn-id: https://modmellon.googlecode.com/svn/trunk@166 a716ebb1-153a-0410-b759-cfb97c6a1b53
2012-10-09 08:41:34 +00:00
benjamin.dauvergne 3bf4abe854 add a new helper function to return SAML responses
git-svn-id: https://modmellon.googlecode.com/svn/trunk@165 a716ebb1-153a-0410-b759-cfb97c6a1b53
2012-10-09 08:41:27 +00:00
benjamin.dauvergne e5b6d0b87f Fix commit 140: error in the merge statement for authn_context_class_ref configuration variable
git-svn-id: https://modmellon.googlecode.com/svn/trunk@158 a716ebb1-153a-0410-b759-cfb97c6a1b53
2012-06-28 10:44:03 +00:00
olavmrk 4925e34369 Add support for double-quoted cookie values.
JMeter may apparently use this.

git-svn-id: https://modmellon.googlecode.com/svn/trunk@157 a716ebb1-153a-0410-b759-cfb97c6a1b53
2012-05-14 10:14:33 +00:00
olavmrk 1c334c09f1 Version 0.5.0
git-svn-id: https://modmellon.googlecode.com/svn/trunk@156 a716ebb1-153a-0410-b759-cfb97c6a1b53
2012-04-16 09:13:16 +00:00
olavmrk b6657e645e Update NEWS-file for version 0.5.0.
git-svn-id: https://modmellon.googlecode.com/svn/trunk@155 a716ebb1-153a-0410-b759-cfb97c6a1b53
2012-04-16 09:13:09 +00:00
olavmrk 1e6ee0de60 Deprecate «MellonDecoder "feide"»
This attribute encoding has not been required since Moria3, which was
shut down in July 2010. This value should therefore no longer be used.

git-svn-id: https://modmellon.googlecode.com/svn/trunk@154 a716ebb1-153a-0410-b759-cfb97c6a1b53
2012-04-12 06:38:04 +00:00
benjamin.dauvergne ce1a5d08aa Add directive MellonSubjectConfirmationDataAddressCheck
MellonSubjectConfirmationDataAddressCheck allows to block client address
checking as given in IdP assertion in the SubjectConfirmationData node,
it can be necessary when client and IdP or SP are in a NAT-ed network or
when the SP is behind a reverse proxy.

git-svn-id: https://modmellon.googlecode.com/svn/trunk@152 a716ebb1-153a-0410-b759-cfb97c6a1b53
2012-02-17 14:01:24 +00:00
olavmrk 10e2522815 Support for HTTP-POST SingleSignOnService endpoint.
This patch extends mod_mellon with support for sending authentication
requests with the HTTP-POST binding.

git-svn-id: https://modmellon.googlecode.com/svn/trunk@151 a716ebb1-153a-0410-b759-cfb97c6a1b53
2012-01-12 13:31:07 +00:00
olavmrk 083d0f9921 Always redirect to the login URL when starting authentication.
We cannot display any pages from the am_start_auth()-function since
it runs from the access checker. We therefore need to redirect to the
login handler, which can then display web pages.

git-svn-id: https://modmellon.googlecode.com/svn/trunk@150 a716ebb1-153a-0410-b759-cfb97c6a1b53
2012-01-12 13:31:03 +00:00
olavmrk faf54a426f Split am_auth_new_ticket() into am_handle_auth() and am_start_auth().
The code in am_auth_new_ticket() was shared between the "auth"
endpoint and the code to start authentication from other requests. This
results in the possibility of unpredictable interactions between those
functions.

For example, it was possible to select the IdP from a random page by
adding the "IdP" parameter. The "ReturnTo" parameter could also affect
where the user was sent after authentication.

The result of this change is two new functions, one for starting
authentication from other requests, and one for handling the "auth"
endpoint. The "auth"-endpoint is no longer used by code, but may
be used elsewhere. It is therefore included for backwards
compatibility.

git-svn-id: https://modmellon.googlecode.com/svn/trunk@149 a716ebb1-153a-0410-b759-cfb97c6a1b53
2012-01-12 13:30:58 +00:00
olavmrk 9e9ad9fd7a Extract am_start_disco() from am_auth_new_ticket().
In preparation of splitting am_auth_new_ticket() into two functions,
extract the code to redirect to the discovery service into its own
function.

git-svn-id: https://modmellon.googlecode.com/svn/trunk@148 a716ebb1-153a-0410-b759-cfb97c6a1b53
2012-01-12 13:30:54 +00:00
olavmrk 673cdf63c1 Move discovery response endpoint to "login" instead of "auth".
We now have a "login" endpoint that can be used for triggering
authentication. Make the discovery service send its response to that
page.

git-svn-id: https://modmellon.googlecode.com/svn/trunk@147 a716ebb1-153a-0410-b759-cfb97c6a1b53
2012-01-12 13:30:50 +00:00
olavmrk b1d829f3a4 Fix entityID sent to discovery service.
We assumed that the SP entityID was always the endpoint path
followed by "metadata". This does not need to be the case. This patch
changes it to fetch the SP entityID from the SP metadata.

git-svn-id: https://modmellon.googlecode.com/svn/trunk@146 a716ebb1-153a-0410-b759-cfb97c6a1b53
2012-01-12 13:30:45 +00:00
olavmrk 1b8d4993cd Do not set headers twice.
For historic reasons, we added several headers to both "headers_out"
and "err_headers_out". This has the unfortunate side effect of sending
the headers twice. This change modifies the code to only add those
headers to "err_headers_out", which is sent both for successful
requests and for errors.

git-svn-id: https://modmellon.googlecode.com/svn/trunk@145 a716ebb1-153a-0410-b759-cfb97c6a1b53
2012-01-12 13:30:39 +00:00
olavmrk 3982cb840f Merge am_endpoint_handler() and am_handler().
We currently handle requests to many endpoints from the access control
hooks. This change bypasses access control in those cases, and handles
the requests from the "handler" hook instead.

This change is necessary to be able to do anything else than redirects
from the handlers. As a side effect, it also simplifies the code.

git-svn-id: https://modmellon.googlecode.com/svn/trunk@144 a716ebb1-153a-0410-b759-cfb97c6a1b53
2012-01-12 13:30:34 +00:00
olavmrk cadafe18b2 Compatibility with older versions of the apr library.
The APR_ARRAY_PUSH() macro was recently added to apr. Instead of using
it, just use apr_array_push().

Thanks to Benjamin Dauver for providing this patch!

git-svn-id: https://modmellon.googlecode.com/svn/trunk@143 a716ebb1-153a-0410-b759-cfb97c6a1b53
2011-12-14 07:09:17 +00:00
olavmrk c888ef73f7 Initialize AuthnRequest with asked AuthnContextClassRef if needed
Thanks to Benjamin Dauvergne for implementing this.

git-svn-id: https://modmellon.googlecode.com/svn/trunk@142 a716ebb1-153a-0410-b759-cfb97c6a1b53
2011-12-07 10:19:44 +00:00
olavmrk d9732add30 Add checking for AuthContextClassRef
- If request miss needed elements AuthnStatement or AuthnContext, HTTP
  status BadRequest is returned.
- If request does not match one of the required AuthnContextClassRef,
  HTTP status Forbidden is returned.

Thanks to Benjamin Dauvergne for implementing this.

git-svn-id: https://modmellon.googlecode.com/svn/trunk@141 a716ebb1-153a-0410-b759-cfb97c6a1b53
2011-12-07 10:19:40 +00:00
olavmrk 463d0450de Add MellonAutnContextClassRef to configuration directives
You can list many class refs they will be concatenated inside an array.
Beware that in each directory, if there is any
MellonAuthnContextClassRef directive, any settings from the previous
level is overwritten.

Thanks to Benjamin Dauvergne for implementing this.

git-svn-id: https://modmellon.googlecode.com/svn/trunk@140 a716ebb1-153a-0410-b759-cfb97c6a1b53
2011-12-07 10:19:35 +00:00
manu@netbsd.org 9dfc3a92ef Honour MellonProbeDiscoveryIdP order when sending probes
git-svn-id: https://modmellon.googlecode.com/svn/trunk@139 a716ebb1-153a-0410-b759-cfb97c6a1b53
2011-12-05 19:06:44 +00:00
olavmrk 6be1eb4530 Check for version 2.14 of GLib.
git-svn-id: https://modmellon.googlecode.com/svn/trunk@138 a716ebb1-153a-0410-b759-cfb97c6a1b53
2011-09-23 11:27:49 +00:00
olavmrk 2d6015d74a Avoid dependency on GLib 2.16.
We used GHashTableIter, which wasn't introduced before version 2.16 of
GLib. This patch changes the code to simply use g_hash_table_get_keys
instead.

(This means that we depend on GLib 2.14.)

git-svn-id: https://modmellon.googlecode.com/svn/trunk@137 a716ebb1-153a-0410-b759-cfb97c6a1b53
2011-09-23 11:27:43 +00:00
olavmrk 9eb7a6a432 Avoid using APR_ARRAY_IDX.
APR_ARRAY_IDX is a relatively new macro in the APR package, so we
should avoid using it.

git-svn-id: https://modmellon.googlecode.com/svn/trunk@134 a716ebb1-153a-0410-b759-cfb97c6a1b53
2011-05-18 12:45:23 +00:00
olavmrk 31e25148a1 Version 0.4.0.
git-svn-id: https://modmellon.googlecode.com/svn/trunk@132 a716ebb1-153a-0410-b759-cfb97c6a1b53
2011-05-18 10:49:43 +00:00
olavmrk 50eeb484ce Update news for version 0.4.0.
git-svn-id: https://modmellon.googlecode.com/svn/trunk@131 a716ebb1-153a-0410-b759-cfb97c6a1b53
2011-05-18 10:49:37 +00:00