Commit Graph

184 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 27906fbf69 Merge "Fix test coverage on x509/certificate" 2016-12-21 04:05:42 +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
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 2bc4af273f Merge "Use oslo_utils constant_time_compare" 2016-02-29 10:43:08 +00:00
Stanisław Pitucha b9d893c29c Fix test coverage on x509/certificate
Change-Id: I6b49e752fb5de24b77ac3f34b60db89f416223bb
2016-02-25 09:46:58 +11: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 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 d1ee78f812 Merge "Add test for extension internals (set_value)" 2016-02-23 11:08:05 +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 7aa2f6ff66 Merge "More test coverage" 2016-02-19 14:04:46 +00:00
Jenkins d4ba619b6e Merge "Raise better error on file read problems" 2016-02-19 13:57:10 +00:00
Stanisław Pitucha 64ffe03d67 Add test for extension internals (set_value)
Change-Id: I0ae6efb27f5edddaff7962d81b2240752fa9ce98
2016-02-19 14:21:44 +11: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 f4db3727da Use new version of x509/pkcs10 definitions
Change-Id: Id92058b3ddeb29a788f1e122d74e22cd66edc592
2016-01-28 02:52:41 +00:00
Alex Howells f8a9466d68 Adjust filename to include missing 'n' in backend
Closes-Bug: 1538571
Change-Id: Ia835353761c0a1c9bc1722947cf0f57ccd48f564
2016-01-27 14:34:19 +00:00
Jenkins 0237b18510 Merge "Add more auth details to the audit message" 2016-01-20 10:27:11 +00:00
Shuquan Huang 8f46701afb Replace assertEqual(None, *) with assertIsNone in tests
Replace assertEqual(None, *) with assertIsNone in tests to have
more clear messages in case of failure.

Change-Id: I33b61064ec957a79bec4c6deef7ce5e4c8e8d141
Closes-bug: #1280522
2015-12-16 18:17:51 +08: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
Stanisław Pitucha 86c69760c7 More test coverage
Change-Id: I025abea5d1deae4523f159396053b75923507b08
2015-11-09 19:03:42 +11: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 a976084f65 Merge "Add key size validator" 2015-11-01 06:01:54 +00:00
Jenkins a66bb3b404 Merge "Use only one test request" 2015-11-01 06:00:18 +00:00
Jenkins 3b374f722a Merge "Add mising extensions tests" 2015-11-01 05:48:41 +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 f826a63151 Use only one test request
Make sure all test cases use only one certificate request so that it's
easier to manage/update. Also use the example.com domain for that
certificate.

Change-Id: If7104d07d98a96a4f0760087b2dbce71302f060d
Partial-bug: 1491054
2015-10-15 16:26:07 +11:00
Stanisław Pitucha 8b9d55f2b2 Add mising extensions tests
Fixes broken nameconstraints methods found in the process.

Change-Id: Iacc43b0a42416b0b9b5dac3c0c738c0a817261b1
2015-10-15 14:14:27 +11:00
Stanisław Pitucha 5eb0e6895b Validate domain when adding to SAN extension
Make sure that only valid domains can be added to an extension.

Change-Id: Ia512f4dd20e92dee7d44931a8d790be542a62e24
Closes-bug: 1491080
2015-09-29 12:05:01 +00:00
Jenkins dbf1634a49 Merge "Breaking out validation logic for re-use" 2015-09-29 09:15:32 +00:00
Jenkins e3e4149895 Merge "Move validators to separate modules" 2015-09-29 07:56:25 +00:00
Jenkins 83e93d5d70 Merge "Fix LDAP auth" 2015-09-28 16:29:39 +00:00
Tim Kelsey 778167f5d4 Breaking out validation logic for re-use
This breaks out the validation logic so it can be re-used by a 3rd
party. The validate_csr method has been moved into a new file and
pecan specific stuff has beem removed. This method now returns a
dict of true/false results rather than bailing on the first fail.

The certificate ops version of validate_csr now wraps the generic
one, it adds back in the pecan specific errors and failes as before
if all validators do not report success. Validator errors propogate
out of the generic method but are captured by the certificate_ops
version.

The error message returned to the caller upon validation error (not
validation failure) is now less detailed, we were reporting to much
info before anyway.

Change-Id: Id10a892cc55be9b3665a05510cb72df0a5f29416
2015-09-28 15:28:55 +01:00
Stanisław Pitucha cb86576afa Move validators to separate modules
Separate the utils function so they can be used from other places
without circular dependencies.

Change-Id: I57b1a28926e67077c3d2207cdefabdb57692941a
2015-09-28 14:32:59 +01:00