OSSN-0047: Keystone does not validate that identity providers match federation mappings

Summary

Keystone’s OS-FEDERATION extension does not enforce a link between an identity provider and a federation mapping. This can lead to assertions or claims from one identity provider being used with mappings intended for use with another identity provider, which could result in users obtaining access to resources that they are not intended to have.

Affected Services / Software

Keystone, Juno, Kilo

Discussion

Keystone’s OS-FEDERATION extension allows for a set of environment variables provided by a trusted identity provider to be used as mapping inputs to determine group membership (and ultimately role assignment). Mapping rules are intended to be identity provider specific, as different identity providers provide their assertions or claims in different forms.

In the Juno release of Keystone, there is no ability within Keystone itself to enforce that assertions or claims from an identity provider are actually being used against a mapping that is associated with that same identity provider. A malicious user from one trusted identity provider could access a Keystone federated authentication URL for a different trusted identity provider. Depending on the content of the assertions or claims and the mapping rules, this could result in a user gaining access to resources that they are not intended to access.

Consider an example deployment where Keystone is configured to trust two identity providers (‘idp1’ and ‘idp2’). The federation mapping for ‘idp1’ might result in users of the ‘devops’ group having the ‘admin’ role on a specific project. If a user with an assertion or claim from ‘idp2’ that says they are in the ‘devops’ group uses the authentication URL that is associated with ‘idp1’, they could also be given the ‘admin’ role just as if they were a ‘devops’ user from ‘idp1’. This access should not be allowed.

Contacts / References

Author: Nathan Kinder, Red Hat