Unfortunately EC2 credentials are not secure enough. EC2 credentials are not protected by limited roles, expiration time, access rules and ec2 secret part is visible via get/list API calls. Leaked EC2 credentials imply a big security risk in terms of access, because EC2 creds token has the same power as a regular user/pass auth.
Hence EC2 AUTH is actively used by Swift S3 emulation (not limited only to Swift, btw.) it would be nice to use application credentials as an auth source in keystone internals and issue a limited access token. With all features application credentials provide, EC2 can get a second wind.
An example of EC2 auth request with application credentials:
$ openstack application credential list
+----------------------------------+---------------+----------------------------------+-------------+----------------------------+
| ID | Name | Project ID | Description | Expires At |
+----------------------------------+---------------+----------------------------------+-------------+----------------------------+
| 3defd466f04646d094a1ee4b6afc53e8 | test | f8d450e9cb7b4f1cbf664401d5bf1d29 | None | 2219-02-13T12:12:12.000000 |
+----------------------------------+---------------+----------------------------------+-------------+----------------------------+
Unfortunately EC2 credentials are not secure enough. EC2 credentials are not protected by limited roles, expiration time, access rules and ec2 secret part is visible via get/list API calls. Leaked EC2 credentials imply a big security risk in terms of access, because EC2 creds token has the same power as a regular user/pass auth.
Hence EC2 AUTH is actively used by Swift S3 emulation (not limited only to Swift, btw.) it would be nice to use application credentials as an auth source in keystone internals and issue a limited access token. With all features application credentials provide, EC2 can get a second wind.
An example of EC2 auth request with application credentials:
$ openstack application credential list ------- ------- ------- ------- +------ ------- --+---- ------- ------- ------- ------- --+---- ------- --+---- ------- ------- ------- ---+ ------- ------- ------- ------- +------ ------- --+---- ------- ------- ------- ------- --+---- ------- --+---- ------- ------- ------- ---+ 094a1ee4b6afc53 e8 | test | f8d450e9cb7b4f1 cbf664401d5bf1d 29 | None | 2219-02- 13T12:12: 12.000000 | ------- ------- ------- ------- +------ ------- --+---- ------- ------- ------- ------- --+---- ------- --+---- ------- ------- ------- ---+
+------
| ID | Name | Project ID | Description | Expires At |
+------
| 3defd466f04646d
+------
{ d094a1ee4b6afc5 3e8", Accept- Encoding" : "identity", Authorization" : "AWS4-HMAC-SHA256 Credential= 3defd466f04646d 094a1ee4b6afc53 e8/20220505/ RegionOne/ s3/aws4_ request, SignedHeaders= host;x- amz-content- sha256; x-amz-date, Signature= appCredSecretBa sedSignature" , 4.0-109- generic botocore/1.16.19", X-Amz-Content- Sha256" : "e3b0c44298fc1c 149afbf4c8996fb 92427ae41e4649b 934ca495991b785 2b855", X-Amz-SignedHea ders": "host;x- amz-content- sha256; x-amz-date" asedSignature" ,
"credentials": {
"access": "3defd466f04646
"body_hash": "***",
"headers": {
"
"
"Host": "keystone:8080",
"User-Agent": "aws-cli/1.18.69 Python/3.8.10 Linux/5.
"
"X-Amz-Date": "20220505T101354Z",
"
},
"host": "",
"params": {},
"path": "/",
"signature": "appCredSecretB
"verb": "GET"
}
}
An example of EC2 auth token response with application credentials:
{ n_credential" : { access_ rules": [ ecb029063d8a239 463", e8f07eae- 3a6b-4c3c- a847-f14f6e348d 8f**",
"service" : "key-manager" d094a1ee4b6afc5 3e8", m6C3NgSiQmqQnrB RySYW2A" 05T18:24: 48.000000Z" , admin_project" : false, 05T10:24: 48.000000Z" , application_ credential" 1cbf664401d5bf1 d29", 0da7259faa03f27 04d", 1d9b8bb509fe836 110", password_ expires_ at": "2022-09- 07T18:13: 38.126030"
"token": {
"applicatio
"
{
"id": "9416a34e7f3b45
"method": "GET",
"path": "/v1/secrets/
}
],
"id": "3defd466f04646
"name": "test",
"restricted": true
},
"audit_ids": [
"
],
"catalog": [...],
"expires_at": "2022-05-
"is_
"is_domain": false,
"issued_at": "2022-05-
"methods": [
"
],
"project": {
"domain": {
"id": "default",
"name": "Default"
},
"id": "f8d450e9cb7b4f
"name": "test"
},
"roles": [
{
"id": "a66c3a324bc24c
"name": "limited_role"
}
],
"user": {
"domain": {
"id": "default",
"name": "Default"
},
"id": "0c4cac95c03944
"name": "appCredOwner",
"
}
}
}