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

Sasha/cos2 #3234

Merged
merged 2 commits into from
Jan 3, 2020
Merged

Sasha/cos2 #3234

merged 2 commits into from
Jan 3, 2020

Conversation

klizhentas
Copy link
Contributor

@klizhentas klizhentas commented Dec 28, 2019

This PR is a combination of two commits:

S3 compatible storage support

  • The first is a slightly modified commit from @balpert89 that extends URI scheme, that now supports the following URI parameters for audit_session_uri.

After writing a bunch of code that introduces new syntax, I had to roll it all back, because it was hard to make it backwards compatible with our existing structure. So ultimately I decided to go with the URI query format proposed by Benjamin

IBM COS

audit_sessions_uri: 's3://readonly/records?endpoint=s3.us-east.cloud-object-storage.appdomain.cloud&region=ibm'

region=ibm is a must have region for IBM COS
endpoint=s3.us-east.cloud-object-storage.appdomain.cloud is a region specific endpoint listed in the IBM cloud UI.

The credentials are used from ~/.aws/credentials and should be created with HMAC option:

cos_hmac_keys:                                          
     access_key_id:       examplekey13513561356         
     secret_access_key:   exampleval151236162462462         

https://cloud.ibm.com/docs/services/cloud-object-storage/hmac?topic=cloud-object-storage-uhc-hmac-credentials-main

@benarent would be good to have a video guide on how to use all it

Insecure and no server side encryption

This example turns of HTTPS and server side encryption for S3 compatible storages:

audit_sessions_uri: 's3://readonly/records?endpoint=example.com&insecure=true&disablesse=true'

Etcd password support

Second commit adds password support and it makes client cert auth optional.

Here is an example:

storage:
    type: etcd
    peers: ['https://example.com:30983']
    username: 'username'
    password_file: '/mnt/secrets/etcd-pass'
    tls_ca_file: '/mnt/secrets/etcd-ca.pem'

Please note that we force good security by asking password to be a file.

@klizhentas
Copy link
Contributor Author

@russjones we need to merge it into 4.2 first and then forward-port to master, so our customers who requested both features can give it a try, please ping them in the channel @benarent when this will be done (I will be on vacation until Jan 5th, so this should be done without me)

This commit adds support for etcd password authentication,
it makes client cert auth optional.

Here is an example:

```yaml
storage:
    type: etcd
    peers: ['https://example.com:30983']
    username: 'username'
    password_file: '/mnt/secrets/etcd-pass'
    tls_ca_file: '/mnt/secrets/etcd-ca.pem'
```
@klizhentas
Copy link
Contributor Author

retest this please

@benarent
Copy link
Contributor

👍 This looks good. The creation of HMAC does look confusing, so I'm sure a video will help. Did we also try this with T-Mobile OPEN TELEKOM Cloud, or just with IBMs cloud?

@gravitational-jenkins
Copy link

gravitational-jenkins commented Dec 30, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants