[openstack-dev] [horizon][keystone] Getting Auth Token from Horizon when using Federation

Edmund Rhudy (BLOOMBERG/ 120 PARK) erhudy at bloomberg.net
Thu May 12 13:07:39 UTC 2016


+1 on desiring OAuth-style tokens in Keystone. The use cases that come up here are people wanting to be able to execute jobs that use the APIs (Jenkins, Terraform, Vagrant, etc.) without having to save their personal credentials in plaintext somewhere, and also wanting to be able to associate credentials with a project instead of a specific person, so that if a person leaves or rotates their password it doesn't blow up their team's carefully crafted automation.

We can sort of work around it with LDAP service accounts as mentioned previously, but the concern around those is the lack of speedy revocability in the event of a compromise, and the service accounts could possibly be used to get to non-OpenStack places until they get shut down. One thought I had to try to keep the auth domain constrained to only OpenStack was using the EC2 API because at least that means you're not saving LDAP passwords on disk and the access keys are useless beyond that particular Keystone installation, but you run into impedance mismatches between the Nova API and AWS EC2 API, and we'd like people to use the native OpenStack APIs. (Turns out the notion of using AWS's EC2 API to talk to a private cloud is strange to people not steeped in cloudy things.)

From: openstack-dev at lists.openstack.org 
Subject: Re: [openstack-dev] [horizon][keystone] Getting Auth Token from Horizon when using Federation

Hi Dolph,

On Mon, 2016-04-18 at 17:50 -0500, Dolph Mathews wrote:
> 
> On Mon, Apr 18, 2016 at 11:34 AM, Martin Millnert <martin at millnert.se>
> wrote:
>         Hi,
>         
>         we're deploying Liberty (soon Mitaka) with heavy reliance on
>         the SAML2
>         Federation system by Keystone where we're a Service Provider
>         (SP).
>         
>         The problem in this situation is getting a token for direct
>         API
>         access.(*)
>         
>         There are conceptually two methods to use the CLI:
>          1) Modify ones (each customer -- in our case O(100)) IdP to
>         add support
>         for a feature called ECP(**), and then use keystoneauth with
>         SAML2
>         plugin,
>          2) Go to (for example) "Access & Security / API Access / View
>         Credentials" in Horizon, and check out a token from there.
> 
> 
> With a default configuration, this token would only last a short
> period of time, so this would be incredibly repetitive (and thus
> tedious).

Indeed.

> So, I assume you mean some sort of long-lived API tokens?

Right.

> API tokens, including keystone's UUID, PKI, PKIZ, and Fernet tokens
> are all bearer tokens, so we force a short lifetime by default,
> because there are always multiple parties capable of compromising the
> integrity of a token. OAuth would be a counter example, where OAuth
> access tokens can (theoretically) live forever.

This does sound very interesting. As long as the end user gets something
useful to plug into the openstack auth libraries/APIs, we're home free
(modulo security considerations, etc).

>         2) isn't implemented. 1) is a complete blocker for many
>         customers.
>         
>         Are there any principal and fundamental reasons why 2 is not
>         doable?
>         What I imagine needs to happen:
>           A) User is authenticated (see *) in Horizon,
>           B) User uses said authentication (token) to request another
>         token from
>         Keystone, which is displayed under the "API Access" tab on
>         "Access &
>         Security".
> 
> 
> The (token) here could be an OAuth access token.

Will look into this (also as per our discussion in Austin).

The one issue that has appeared in our continued discussions at home, is
the contrast against "service user accounts", that seems a relatively
prevalent/common among deployers today, which basically use
username/password as the api key credentials, e.g. the authZ of the
issued token:

If AdminNameless is Domain Admin in their domain, won't their OAuth
access token yield keystone tokens with the same authZ as they otherwise
have?

My presumptive answer being 'yes', brought me to the realization that,
if one wants to avoid going the way of "service user accounts" but still
reduce authZ, one would like to be able to get OAuth access tokens for a
specific project, with a specific role (e.g. "user", or [project-]admin)
and the authZ this entails. This would keep the traceability, which is
one of the main issues with non-personal accounts.

How feasible is this last bit?


In general, the primary use case is:
 - I as a user of openstack on my personal computer retrieve a token to
manage openstack client operations without the need of storing my
Federation-username/password in local config (nor typing the password in
on the keyboard).

An extended use case definition of this being:
 - I as a user of openstack can provision an automated system with these
credentials, that can continue to operate as an openstack client for a
very long time without maintenance (i.e., either token renewal or
VeryLongLifetime).

Best,
Martin


__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20160512/0aa86fd4/attachment.html>


More information about the OpenStack-dev mailing list