Openstack中安全审计问题

https://wiki.openstack.org/wiki/Security/Icehouse


包括以下安全问题:

  • Implemented cryptography - what cryptography is implemented directly in an OpenStack project.
  • Used cryptography - what external libraries are used that perform cryptographic operations.
  • Encryption algorithms - what encryption algorithms are used, and what are they used for.
  • Hashing algorithms - what hashing algorithms are used, and what are they used for.
  • Sensitive data - What sensitive data is handled by a project, and how is it protected.
Keystone模块的安全情况:

https://wiki.openstack.org/wiki/Security/Icehouse/Keystone


Implemented Crypto

None.

Used Crypto

Libraries
  • oauthlib (uses hashlib)
  • OpenSSL
  • PassLib
  • PyCrypto
  • Python hashlib
  • python-ldap (ultimately uses GnuTLS, NSS, or OpenSSL depending on the platform)
  • Requests (for keystoneclient HTTPS usage - need to investigate underlying crypto usage)
Encryption Algorithms
AlgorithmPurposeConfigurableImplementationDetailsSource
AESMemcache backend encryptionNoPyCrypto
  • Optionally used for encrypting the token backend.
  • keystoneclient/middleware/memcache_crypt.py
RSAPKI token signingYesOpenSSL
  • 2048, sha1 defaults
  • Configurable via openssl.conf.
  • Keys/Certs can be created outside of Keystone and dropped into place.
  • keystone/common/openssl.py
  • keystoneclient/common/cms.py
Hashing Algorithms
AlgorithmPurposeConfigurableImplementationDetailsSource
md5Token hashingNohashlib
  • Hash is used as an internal identifier in the token backend.
  • The data being hashed is the entire cryptographically signed token (which uses the configured signing key). The chance for collisions should be low.
  • keystoneclient/utils.py
  • keystoneclient/common/cms.py
sha1S3 credentialsNohashlib
  • Used for signature validation of S3 credentials.
  • Required for S3 compatibility, so it can't be configurable.
  • keystone/contrib/s3/core.py
sha1LDAP password hashingNoPassLib
  • Salted using PassLib default (currently 4 bytes).
  • keystone/common/utils.py
sha1OAuth1Nooauthlib
  • Used for signature validation of OAuth1 tokens.
  • Keystone only uses the HMAC-SHA1 signature for OAuth1 tokens (as described in RFC 5849).
  • OAuth support can be disabled.
  • keystone/contrib/oauth1/core.py
  • keystone/contrib/oauth1/verifier.py
sha256EC2 tokensNohashlib
  • Required for EC2 compatibility, so it can't be configurable.
  • keystone/credential/controllers.py
  • keystone/common/utils.py
  • keystoneclient/contrib/ec2/utils.py
sha384Memcache signingNohashlib
  • Used for signing and verification when memcache encryption is enabled.
  • keystoneclient/middleware/memcache_crypt.py
sha512Password hashingNoPassLib
  • The algorithm is non-configurable, but the number of rounds is configurable via CONF.crypt_strength (default=40000).
  • keystone/common/utils.py

Sensitive Data

Keys/Certificates
  • PKI signing key - Protected via filesystem ownership/permissions.
  • SSL/TLS key - Protected via filesystem ownership/permissions.
Passwords
  • SSL/TLS must be enabled in Keystone to prevent clients from sending passwords over the network in clear-text.
  • Passwords are truncated to a maximum length prior to hashing
    • Configurable via CONF.identity.max_password_length (default=4096)
  • SQL Identity
    • Password hashes are stored in SQL database.
    • SSL/TLS can be used to protect the connection to the database.
  • LDAP Identity
    • SSL/TLS must be used for connections to LDAP to prevent Keystone from sending passwords over the network in clear-text.
Tokens
  • Signed tokens are stored in their entirety in one of the following backends:
    • KVS
    • Memcached
      • Ephemeral storage.
      • Able to use AES encryption and sha384 signing.
    • SQL (default)
      • Persistent storage.
      • SSL/TLS can be used to protect the connection to the database.
  • Expired tokens are not automatically removed from the backend. The "keystone-manage token_flush" command should be used to periodically remove expired tokens (via cron).

Potential Improvements

  • Eliminate LDAP user password hashing. This code should be unnecessary, as passwords supplied by clients should only be used to perform LDAP bind operations and never stored locally in any form.
  • Allow all hashing schemes to be configurable where not restricted by compatibility requirements (such as S3 and EC2)
  • The use of md5 for token hashing is the biggest concern, as it's use is discouraged (or disallowed in the case of FIPS). Changes are in progress to make this configurable in Juno. The default should be sha256 if possible.
  • Allow support for LDAP SASL bind methods(such as DIGEST-MD5 and GSSAPI).
  • Allow other forms of external authentication to avoid using passwords (Kerberos, SAML).

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值