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

Fix session logout #485

Closed
wants to merge 1 commit into from
Closed

Fix session logout #485

wants to merge 1 commit into from

Conversation

simo5
Copy link
Contributor

@simo5 simo5 commented Feb 20, 2017

There were 2 issues with session logouts, one is that the logout_cookie
was checked and acted on in the wrong place, the other is that the wrong
value was set in the IPASESSION header.

Fixes https://fedorahosted.org/freeipa/ticket/6685

Signed-off-by: Simo Sorce simo@redhat.com

There were 2 issues with session logouts, one is that the logout_cookie
was checked and acted on in the wrong place, the other is that the wrong
value was set in the IPASESSION header.

Fixes https://fedorahosted.org/freeipa/ticket/6685

Signed-off-by: Simo Sorce <simo@redhat.com>
@stlaz stlaz self-assigned this Feb 21, 2017
Copy link
Contributor

@stlaz stlaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fix seems obvious, need to test it, though.

@@ -23,6 +23,6 @@ def execute(self, *args, **options):
else:
delattr(context, 'ccache_name')

setattr(context, 'logout_cookie', '')
setattr(context, 'logout_cookie', 'MagBearerToken=')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: I expect that on an empty MagBearerToken we go in this branch modauthgssapi:src/sessions.c#L126 and the session is dropped later. Did not find any documentation on MagBearerToken though.
Also, this is just a workaround for https://fedorahosted.org/freeipa/ticket/6685, our cookies don't really get blacklisted, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MagBearerToken is the value that matter sin the cookie generated by mod_auth_gssapi. Since the privsep partches removed our session code and use mod_auth_gssapi + mod_session instead, then that's what we need to use.

This patch is a fix for 6685, the part about blacklist is just a suggestion for an aditional improvement but it is not required to fix the issue.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the explanation.

@stlaz stlaz added the ack Pull Request approved, can be merged label Feb 21, 2017
@stlaz
Copy link
Contributor

stlaz commented Feb 21, 2017

Works as expected.

@martbab
Copy link
Contributor

martbab commented Feb 22, 2017

@martbab martbab added the pushed Pull Request has already been pushed label Feb 22, 2017
@martbab martbab closed this Feb 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ack Pull Request approved, can be merged pushed Pull Request has already been pushed
Projects
None yet
3 participants