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

jewel: rgw: swift: disable revocation thread under certain circumstances #14789

Merged
merged 1 commit into from Jun 9, 2017

Conversation

mdw-at-linuxbox
Copy link
Contributor

Keystone tokens can be revoked. This causes them to fail
validation. However, in ceph, we cache them. As long as
they're in the cache we trust them. To find revoked tokens
there's a call OSI-PKI/revoked but that's only useful for
pki tokens. Installations using fernet/uuid may not even
have the proper credentials to support the call, in which
case the call blows up in various ways filling up logs
with complaints.

This code makes the revocation thread optional; by disabling it,
the complaints go away. A further fix is in the works
to use other more modern calls available in modern keystone
installations to properly deal with non-PKI/PKIZ tokens.

(NB: jewel has this logic in src/rgw/rgw_swift.cc not in src/rgw/rgw_keystone.h)

To disable the revocation thread, use at least one of these:
rgw_keystone_token_cache_size = 0
using this will cause tokens to be validated on every call.
You may instead want to set
rgw_keystone_revocation_interval = 0
using just this will disable the revocation thread,
but leaves the cache in use. That avoids the extra
validation overhead, but means token revocation won't
work very well.

Fixes: http://tracker.ceph.com/issues/9493
Fixes: http://tracker.ceph.com/issues/19499

Signed-off-by: Marcus Watts mwatts@redhat.com
(cherry picked from commit 003291a)

Keystone tokens can be revoked.  This causes them to fail
validation.  However, in ceph, we cache them.  As long as
they're in the cache we trust them.  To find revoked tokens
there's a call OSI-PKI/revoked but that's only useful for
pki tokens.  Installations using fernet/uuid may not even
have the proper credentials to support the call, in which
case the call blows up in various ways filling up logs
with complaints.

This code makes the revocation thread optional; by disabling it,
the complaints go away.  A further fix is in the works
to use other more modern calls available in modern keystone
installations to properly deal with non-PKI/PKIZ tokens.

(NB: jewel has this logic in src/rgw/rgw_swift.cc not in src/rgw/rgw_keystone.h)

To disable the revocation thread, use at least one of these:
        rgw_keystone_token_cache_size = 0
		using this will cause tokens to be validated on every call.
You may instead want to set
        rgw_keystone_revocation_interval = 0
		using just this will disable the revocation thread,
		but leaves the cache in use.  That avoids the extra
		validation overhead, but means token revocation won't
		work very well.

Fixes: http://tracker.ceph.com/issues/9493
Fixes: http://tracker.ceph.com/issues/19499

Signed-off-by: Marcus Watts <mwatts@redhat.com>
(cherry picked from commit 003291a)
@mattbenjamin mattbenjamin changed the title rgw: swift: disable revocation thread if sleep == 0 || cache_size == 0 jewel: rgw: swift: disable revocation thread if sleep == 0 || cache_size == 0 Apr 25, 2017
@ktdreyer ktdreyer added this to the jewel milestone Apr 25, 2017
@ktdreyer
Copy link
Member

backport tracked in http://tracker.ceph.com/issues/19772

@mdw-at-linuxbox
Copy link
Contributor Author

I've run an instance of this with keystone. Turning off
rgw keystone revocation interval = 0
rgw keystone token cache size = 0
turns off the revocation thread. (turning off either alone should suffice, with slight differences in behavior as per the commit message.)

asheplyakov pushed a commit to asheplyakov/ceph that referenced this pull request May 18, 2017
…thread if sleep == 0 || cache_size == 0

Reviewed-by: Nathan Cutler <ncutler@suse.com>
@theanalyst
Copy link
Member

@yehudasa @cbodley this passed an integration run http://tracker.ceph.com/issues/19538#note-61 do you think we're ready to merge this PR to jewel?

@cbodley
Copy link
Contributor

cbodley commented Jun 9, 2017

@theanalyst yes please

@theanalyst theanalyst merged commit fdd25c2 into ceph:jewel Jun 9, 2017
@smithfarm smithfarm changed the title jewel: rgw: swift: disable revocation thread if sleep == 0 || cache_size == 0 jewel: rgw: swift: disable revocation thread under certain circumstances Jul 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants