cloudflare / cloudflare/cfssl

Proposal: Integrate Keystone based authenticator

Open
#658 3 comments 1 reaction 0 assignees View on GitHub
Dominant language
Go
Stars
9.5k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

# Feature Proposal

[Keystone](http://docs.openstack.org/developer/keystone/) is an IAM provider in [Openstack](http://openstack.org/). It has the abstractions to manage users, roles, projects and domains. It is often used as an authenticator and authorizer for any systems deployed in an Openstack private cloud. I would like to add this integration into cfssl, so that any deployment of cfssl in an openstack based environment would be seamless and easy for the users.
# One way to do it

Add an other auth plugin called Keystone in https://github.com/cloudflare/cfssl/tree/master/auth with the following Schema.

``` go

type osConfig struct {
AuthUrl string `json:"auth-url"`
Username string `json:"user-name"`
UserId string `json:"user-id"`
Password string `json:"password"`
ApiKey string `json:"api-key"`
TenantId string `json:"tenant-id"`
TenantName string `json:"tenant-name"`
Region string `json:"region"`
}

type OpenstackClient struct {
provider *gophercloud.ProviderClient
authClient *gophercloud.ServiceClient
config *osConfig
}

type KeystoneTokenAuthenticator struct {
osClient Interface
}

func NewKeystoneTokenAuthenticator(configFile) (auth.Provider, error) {
// Initializes the openstack client using the openstack config file and returns the KeystoneTokenAuthenticator
}

func (ks *KeystoneTokenAuthenticator) Token(req []byte) (token []byte, err error) {
// Reads the request headers to retrieve the keystone token
}

func (ks *KeystoneTokenAuthenticator) Verify(aReq *AuthenticatedRequest) bool {
// Contacts Openstack Keystone to get the details of the token, if the token is still valid, return true, else, return false
}
```

Let me know if this would be a value add to the project and I can send a commit right away. Planning to try a POC of this in a Kubernetes cluster at eBay.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.