Commit Graph

219 Commits

Author SHA1 Message Date
lhinds 93aacb43e6 Retiring Project
http://lists.openstack.org/pipermail/openstack-sigs/2018-August/000481.html

Depends-On: 90ca23f2ef5bf2cfdaf63552a7d8d8be325a03e6

Change-Id: I9ebc8cfcbb8906e9c4e1fd9e91205fe364bdc3c9
2018-08-28 09:41:53 +01:00
Jenkins b050019661 Merge "Anchor can now be installed and invoked as simply "anchor"" 2017-02-20 14:24:49 +00:00
Jenkins 24ba8fc0c8 Merge "Make Anchor compatible with ldap3>=2.0.7" 2016-12-01 17:42:34 +00:00
Stanisław Pitucha b4be922aab Make Anchor compatible with ldap3>=2.0.7
Don't rely on main ldap3 namespace to contain all exceptions.

Change-Id: I5cc42beb97e1a81614a6d2505832d3aa1de4e0a7
2016-11-03 12:37:04 +11:00
Jenkins 322b975feb Merge "Allow custom domain labels" 2016-09-12 08:16:22 +00:00
Tim Kelsey ef2160e82e Anchor can now be installed and invoked as simply "anchor"
This installs stuff in the right places to run anchor from the
included startup scripts. The config is installed into /etc/anchor

This will work from within a venv or without.

The anchor config.py file has been moved into the project package
so that it will install with the other stuff. Eventually we should
strip it out as much as possible and move the details into the JSON
file.

Change-Id: Iffaa7669ce8118fbd41011f9e965704c2ad51b44
2016-09-08 17:00:37 +00:00
gecong1973 2c12970756 Add __ne__ built-in function
In Python 3 __ne__ by default delegates to __eq__ and inverts the
result, but in Python 2 they urge you to define __ne__ when you
define __eq__ for it to work properly [1].There are no implied
relationships among the comparison operators. The truth of x==y
does not imply that x!=y is false. Accordingly, when defining __eq__(),
one should also define __ne__() so that the operators will behave
as expected.
[1]https://docs.python.org/2/reference/datamodel.html#object.__ne__

Change-Id: Iebabc4deea0aadbec4e73aae52e78bfd84209379
2016-09-05 09:21:00 +08:00
zhangyanxian a9874e0519 Fix typo in the certificate_ops file
Change-Id: I204da2320650ff8238df79fdabd67c34d90c9acb
2016-08-04 06:12:34 +00:00
zhangyanxian d771f53959 Fix some spelling mistakes
Change-Id: I9dc80deb65022618f3ac501fad0af992f9abbc3f
2016-07-22 02:43:35 +00:00
Stanisław Pitucha 2257b8bbed Allow custom domain labels
Original validator checked for domain labels as defined by RFC1034, however real
internet deals with other domains as well - starting with digits or symbols.
This change allows modifying the pattern to allow custom / relaxed rules.

Validation has been removed from adding a domain to a new extension, since it's
only used in fixups and the domain should be already validated. (or not, if not
configured)

Closes-bug: 1592489

Change-Id: Ib453054ba5f554bab28cff392c539e713fa28918
2016-06-16 19:34:18 +10:00
Stanisław Pitucha e585255333 Better messages for deprecated algos
For known, but deprecated algorithms (md{2,4,5}, sha1), log a better message
rather than just the OID of the rejected algorithm.

Change-Id: I004cbfe486657a80f482e506e4e1fc9396564391
2016-05-06 16:40:17 +10:00
Jenkins 59c4e47133 Merge "Fix typo in certificate.py" 2016-03-14 17:26:07 +00:00
Jenkins 2bc4af273f Merge "Use oslo_utils constant_time_compare" 2016-02-29 10:43:08 +00:00
jvora fc7c94feaf Fix typo in certificate.py
Change-Id: Id83add4b0ff7eaffef79936187eb7042f6cace4e
2016-02-24 12:55:02 -08:00
Jenkins d2277c0879 Merge "Handle missing CA better" 2016-02-24 02:43:13 +00:00
Eric Brown a0ab1ba935 Use oslo_utils constant_time_compare
The olso_utils library already contains a constant_time_compare
function and the Anchor version is nearly identical. Might as
well use the global util rather than have a copy of its own.

Change-Id: Iaf02c20560ca244d244a88127996139f8abcce9b
2016-02-23 14:20:44 -08:00
Jenkins a49fdbf87d Merge "Clean up validator lists" 2016-02-23 11:44:56 +00:00
Jenkins fbbdcbf388 Merge "Don't fail on unknown name elements" 2016-02-23 11:44:42 +00:00
Jenkins 639ab9cd99 Merge "Add the PKCS11-based signing backend" 2016-02-23 11:13:19 +00:00
Jenkins 737d1efc57 Merge "Refactor the signing backends" 2016-02-23 11:12:11 +00:00
Jenkins 7b7592c099 Merge "Make copy of the name" 2016-02-23 11:06:53 +00:00
Stanisław Pitucha 65621def14 Clean up validator lists
Move signature validation to standards validators. Remove old validator entries
from the setup.cfg.

Partial-Bug: #1548610
Change-Id: I667b0ad1a49766c2df09489ea3a11e0e77bc4333
2016-02-23 04:53:26 +00:00
Jenkins d4ba619b6e Merge "Raise better error on file read problems" 2016-02-19 13:57:10 +00:00
Stanisław Pitucha bc7d311806 Handle missing CA better
Change-Id: I6fdbf15141d0bc2b3d56ac8a368769f8f492b995
2016-02-19 13:58:18 +11:00
Stanisław Pitucha 524a4cef34 Add the PKCS11-based signing backend
Change-Id: I576a6837f2239d4e82baaacc68342a897db07f1d
2016-02-19 13:09:27 +11:00
Stanisław Pitucha d0fa9b519d Refactor the signing backends
Prepare for new signing backend implementations which reuse the existing
functionality. This abstracts most of the current signing function, so that the
signature generation itself can be replaced.

Change-Id: I99a28f4bcb08f010f397faf49e23276672977bc1
2016-02-19 13:09:25 +11:00
Stanisław Pitucha 9a2b7ebf79 Make copy of the name
Don't return a name which points back to the certificate internals anymore. Use
copies of the name everywhere.

Change-Id: I578df2de4128f5865c6c2363fee6f75a219bf9c7
Closes-bug: 1491083
2016-02-19 12:57:30 +11:00
Stanisław Pitucha 9e7cdf50b1 Raise better error on file read problems
Change-Id: I0c89ee950d27fb36e3c9b6f22b3d13d9e4d8c20c
2016-02-08 16:44:16 +11:00
Stanisław Pitucha 4ec98b6fd8 Copy key identifier from the available CA
If the subjectAlternativeKey is available in the CA, use it as authority key on
the new certificate. Otherwise embed the serial number.

The key id is included in the signed certificates according to
RFC5280 section-4.2.1.1. Anchor uses the first recommended method of keyid
generation. The behaviour matches openssl.

Change-Id: I883f8d5d9dc3430443aa08fdf2448bf385575557
2016-02-03 17:59:53 +11:00
Stanisław Pitucha 7f51b08ea3 Add support for CMC requests
Incoming CMC requests should be stripped of all wrappers, then the internal
pkcs10 request is processed as usual. No verification is done on the SignedData
wrapper, because there's no known certificate to trust.

Response is just the bare certificate for now.

Change-Id: I92c76df775e5f339ac2fae95582097e3afe138af
2016-01-29 05:40:43 +00:00
Stanisław Pitucha 212989664c Don't fail on unknown name elements
Names cannot be parsed if the type is unknown. Just return the string "UNKNOWN"
as a value in that case.

Change-Id: I12889b139907e0bd852ad842ad5b7d027adb0949
2016-01-28 20:08:08 +11:00
Stanisław Pitucha a309748be9 Make sure no "empty" extensions are created
Skipping an extension could previously result in an empty entry in the
certificate.

Change-Id: Ibf385ab8841bf33d34b99580bdcfa76f235d6d0e
2016-01-28 02:53:39 +00:00
Stanisław Pitucha f4db3727da Use new version of x509/pkcs10 definitions
Change-Id: Id92058b3ddeb29a788f1e122d74e22cd66edc592
2016-01-28 02:52:41 +00:00
Stanisław Pitucha b8c76c0739 New asn1 modules for CMC support
Asn1 modules are autogenerated and not covered by pep8

Change-Id: I7a4e9c308001ed3051e68d2a27e454977f6e787b
2016-01-28 02:46:44 +00:00
Jenkins 0237b18510 Merge "Add more auth details to the audit message" 2016-01-20 10:27:11 +00:00
Stanisław Pitucha ebfaa3c929 Add more auth details to the audit message
Generate proper user resource id in case of keystone authentication.

Change-Id: Ic5042db62d4db9032866cf8f00e0f03c8f0aeaea
2015-12-04 12:30:42 +11:00
Jenkins a530aa9496 Merge "Add better names validator and deprecate older one" 2015-12-01 16:37:23 +00:00
Jenkins 689ac6efdc Merge "Add support for audit publishing" 2015-12-01 16:33:16 +00:00
Jenkins d33ce42512 Merge "Add audit" 2015-12-01 16:32:44 +00:00
Stanisław Pitucha d7d6db29c7 Add support for audit publishing
Add the support for actually sending the audit messages, or logging them
using the standard logging mechanisms.

Change-Id: I98067da8db4987f9f9859a8c6d5443a94677f856
2015-11-20 22:05:45 +11:00
ZHAO YI 5f22584d44 Fix typo in comments
This patch fixed typo in comments.

Change-Id: I30858724543dd6ec91463e63344091136cbad87a
2015-11-19 16:47:03 +08:00
Stanisław Pitucha 8644dc5834 Add better names validator and deprecate older one
Previous name validators have multiple issues. They do not prevent
unknown entires from passing through. They require repeating rules for
various name locations (cn, san). They also disregard wildcards when
matching only the suffix. The inflexible configuration also makes
specific validators like server_group required.

The new validator whitelist_names solves all those issues and allows to
deprecate old validators.

Implements: blueprint validator-improvement

Change-Id: Id31889f735eb34323f21a91d68a50602351f6611
2015-11-05 16:28:06 +11:00
Jenkins 5bec7f9ae8 Merge "Use hex strings instead of messing with bits" 2015-11-04 16:28:11 +00:00
Jenkins a976084f65 Merge "Add key size validator" 2015-11-01 06:01:54 +00:00
Jenkins 3b374f722a Merge "Add mising extensions tests" 2015-11-01 05:48:41 +00:00
Jenkins 8ad1973259 Merge "Test whole signature module" 2015-11-01 05:43:24 +00:00
Stanisław Pitucha d171715798 Add key size validator
Add a validator for the public key sizes. This allows to reject a
request with a 512b long RSA key for example.

Change-Id: Ib4988e595c4c5cdc643af56e9529e8c0de31d993
2015-10-30 14:26:23 +11:00
Stanisław Pitucha c6cb4d9b3d Remove bad ca_status validator. Always reject CA
Remove a validator which has been marked for an update for some time.
CA certificate signing should not be handled by Anchor at all.

Change-Id: Ib13a0ca3445956e35c23c559f59f37e6721c1a33
Closes-bug: 1508776
2015-10-30 14:00:32 +11:00
Stanisław Pitucha d5db378a6f Fix old comment
Change-Id: I8ba64bb328063d2b6be957092b3005766b09bcda
2015-10-16 14:23:32 +11:00
Stanisław Pitucha 874aae88a8 Use hex strings instead of messing with bits
Replace the custom bytes_to_bin with writing the values as hex.

Change-Id: I1072f889ac9a184ba68b86f89f9c95b0294b27f6
2015-10-16 14:10:49 +11:00