Skip to content

Commit 0e4e1ca

Browse files
Merge pull request #185 from Venafi/rebranding-vcertpython
rebranded vcert python
2 parents 4e874c8 + a7e3f0f commit 0e4e1ca

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+120
-121
lines changed

README.md

Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
[![Venafi](https://raw.githubusercontent.com/Venafi/.github/master/images/Venafi_logo.png)](https://www.venafi.com/)
21

32
[![Apache 2.0 License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
43
![Community Supported](https://img.shields.io/badge/Support%20Level-Community-brightgreen)
5-
![Compatible with TPP 17.3+ & VaaS](https://img.shields.io/badge/Compatibility-TPP%2017.3+%20%26%20VaaS-f9a90c)
4+
![Compatible with CyberArk Certificate Manager, Self-Hosted+ & CyberArk Certificate Manager, SaaS](https://img.shields.io/badge/Compatibility-Certificate%20Manager%2C%20Self--Hosted_17.3%2B_%26Certificate%20Manager%2C%20SaaS-f9a90c)
65
[![pypi Downloads](https://img.shields.io/pypi/dw/vcert)](https://pypi.org/project/vcert/)
76
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=Venafi_vcert-python&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=Venafi_vcert-python)
87

@@ -16,15 +15,15 @@ We welcome and appreciate all contributions. Got questions or want to discuss so
1615

1716
VCert Python is a Python library and SDK designed to simplify key generation and enrollment of machine identities
1817
(also known as SSL/TLS certificates and keys) that comply with enterprise security policy by using the
19-
[Venafi Trust Protection Platform](https://www.venafi.com/platform/trust-protection-platform) or
20-
[Venafi as a Service](https://www.venafi.com/venaficloud).
18+
[CyberArk Certificate Manager, Self-Hosted](https://www.cyberark.com/products/certificate-manager/) or
19+
[CyberArk Certificate Manager, SaaS](https://www.cyberark.com/products/certificate-manager/).
2120

2221
This implementation is based on the original Go library, https://github.com/Venafi/vcert.
2322

2423
#### Compatibility
2524
***Starting version 0.14.0 vcert-python only supports Python 3.6 or higher***
2625

27-
VCert releases are tested using the latest version of Trust Protection Platform. The [latest VCert release](https://github.com/Venafi/vcert-python/releases/latest) should be compatible with Trust Protection Platform 17.3 or higher based on the subset of API methods it consumes.
26+
VCert releases are tested using the latest version of CyberArk Certificate Manager, Self-Hosted. The [latest VCert release](https://github.com/Venafi/vcert-python/releases/latest) should be compatible with CyberArk Certificate Manager, Self-Hosted 17.3 or higher based on the subset of API methods it consumes.
2827

2928
## Installation
3029
Get the library using pip:
@@ -39,18 +38,18 @@ If installation fails collecting dependancies, make sure your python setuptools
3938
## Usage example
4039

4140
For code samples of programmatic use, please review the files in [/examples](https://github.com/Venafi/vcert-python/tree/master/examples).
42-
- For Trust Protection Platform, the `zone` format is the DN of a policy with or without the "\VED\Policy\" prefix (e.g. "\VED\Policy\Certificates\VCert" or simply "Certificates\VCert")
43-
- For Venafi as a Service, the `zone` format is the name of an OutagePREDICT Application and the API Alias of an Issuing Template assigned to it delimited by a single backslash character (e.g. "My Application\My CIT")
41+
- For CyberArk Certificate Manager, Self-Hosted, the `zone` format is the DN of a policy with or without the "\VED\Policy\" prefix (e.g. "\VED\Policy\Certificates\VCert" or simply "Certificates\VCert")
42+
- For CyberArk Certificate Manager, SaaS, the `zone` format is the name of an OutagePREDICT Application and the API Alias of an Issuing Template assigned to it delimited by a single backslash character (e.g. "My Application\My CIT")
4443

45-
## Prerequisites for using with Trust Protection Platform
44+
## Prerequisites for using with CyberArk Certificate Manager, Self-Hosted
4645

4746
1. A user account that has an authentication token with "certificate:manage,revoke" scope (i.e.
48-
access to the "Venafi VCert SDK" API Application as of 20.1) or has been granted WebSDK Access
47+
access to the "CyberArk VCert SDK" API Application as of 20.1) or has been granted WebSDK Access
4948
2. A folder (zone) where the user has been granted the following permissions: View, Read, Write,
5049
Create, Revoke (for the revoke action), and Private Key Read (for the pickup action when CSR is
5150
service generated)
5251
3. Policy applied to the folder which specifies:
53-
1. CA Template that Trust Protection Platform will use to enroll certificate requests submitted by VCert
52+
1. CA Template that CyberArk Certificate Manager, Self-Hosted will use to enroll certificate requests submitted by VCert
5453
2. Subject DN values for Organizational Unit (OU), Organization (O), City (L), State (ST) and Country (C)
5554
3. Management Type not locked or locked to 'Enrollment'
5655
4. Certificate Signing Request (CSR) Generation not locked or locked to 'Service Generated CSR'
@@ -59,22 +58,22 @@ service generated)
5958
7. (Recommended) Key Bit Strength set to 2048 or higher
6059
8. (Recommended) Domain Whitelisting policy appropriately assigned
6160

62-
The requirement for the CA Template to be assigned by policy follows a long standing Venafi best
61+
The requirement for the CA Template to be assigned by policy follows a long standing CyberArk best
6362
practice which also met our design objective to keep the certificate request process simple for
6463
VCert users. If you require the ability to specify the CA Template with the request you can use the
65-
TPP REST APIs but please be advised this goes against Venafi recommendations.
64+
CyberArk Certificate Manager, Self-Hosted REST APIs but please be advised this goes against CyberArk recommendations.
6665

67-
## Prerequisites for using with Venafi as a Service
66+
## Prerequisites for using with CyberArk Certificate Manager, SaaS
6867

69-
1. The Venafi as a Service REST API is accessible from the system where VCert
68+
1. The CyberArk Certificate Manager, SaaS REST API is accessible from the system where VCert
7069
will be executed. Currently, we support the following regions:
71-
- [https://api.venafi.cloud](https://api.venafi.cloud/vaas) [US]
72-
- [https://api.venafi.eu](https://api.venafi.eu/vaas) [EU]
73-
- [https://api.au.venafi.cloud](https://api.au.venafi.cloud/vaas) [AU]
74-
- [https://api.uk.venafi.cloud](https://api.uk.venafi.cloud/vaas) [UK]
75-
- [https://api.sg.venafi.cloud](https://api.sg.venafi.cloud/vaas) [SG]
76-
- [https://api.ca.venafi.cloud](https://api.ca.venafi.cloud/vaas) [CA]
77-
2. You have successfully registered for a Venafi as a Service account, have been granted at least the
70+
- `https://api.venafi.cloud` [US]
71+
- `https://api.venafi.eu` [EU]
72+
- `https://api.au.venafi.cloud` [AU]
73+
- `https://api.uk.venafi.cloud` [UK]
74+
- `https://api.sg.venafi.cloud`[SG]
75+
- `https://api.ca.venafi.cloud` [CA]
76+
2. You have successfully registered for a CyberArk Certificate Manager, SaaS account, have been granted at least the
7877
"Resource Owner" role, and know your API key.
7978
3. A CA Account and Issuing Template exist and have been configured with:
8079
1. Recommended Settings values for:
@@ -92,7 +91,7 @@ will be executed. Currently, we support the following regions:
9291

9392
## Contributing to VCert
9493

95-
Venafi welcomes contributions from the developer community.
94+
CyberArk welcomes contributions from the developer community.
9695

9796
1. Fork it to your account (https://github.com/Venafi/vcert-python/fork)
9897
2. Clone your fork (`git clone git@github.com:youracct/vcert-python.git`)
@@ -112,8 +111,8 @@ See https://packaging.python.org/guides/installing-using-pip-and-virtual-environ
112111

113112
## License
114113

115-
Copyright © Venafi, Inc. All rights reserved.
114+
Copyright © Venafi, Inc. and CyberArk Software Ltd. ("CyberArk")
116115

117116
VCert is licensed under the Apache License, Version 2.0. See [`LICENSE`](https://github.com/Venafi/vcert-python/blob/master/LICENSE) for the full license text.
118117

119-
Please direct questions/comments to opensource@venafi.com.
118+
Please direct questions/comments to mis-opensource@cyberark.com.

docs/version_history.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
## Version History
44

55
#### 0.18.0
6-
* Added support for TPP 25.1
6+
* Added support for CyberArk Certificate Manager, Self-Hosted 25.1
77
* Upgraded dependencies
88
#### 0.17.0
99
* Added ability to retire certificates in both TLSPDC and TLSPC
@@ -15,14 +15,14 @@
1515
#### 0.16.0
1616
* Fixed **[Issue 124](https://github.com/Venafi/vcert-python/issues/124)**: Fixed an issue where adding a Certificate Issuing Template to an existing Application failed
1717
* Upgraded cryptography dependency to 40.0.2 to cover a security risk CVE-2023-23931
18-
* Removed orgUnit field from AppDetails, as Venafi as a Service dropped the use of the field
18+
* Removed orgUnit field from AppDetails, as CyberArk Certificate Manager, SaaS dropped the use of the field
1919
#### 0.15.0
20-
* Fixed **[Issue 100](https://github.com/Venafi/vcert-python/issues/100)**: Updated behavior for 'serviceGenerated' attribute on VaaS
21-
* Fixed **[Issue 101](https://github.com/Venafi/vcert-python/issues/101)**: Added support for the following Subject Alternative Names when creating a policy on VaaS: email, IP, URI
22-
* Closed **[Issue 102](https://github.com/Venafi/vcert-python/issues/102)**: Added support for EC private keys on VaaS
23-
* Closed **[Issue 108](https://github.com/Venafi/vcert-python/issues/108)**: Added ability to add contacts(TPP)/owners(VaaS) to a policy when is created
24-
* Closed **[Issue 113](https://github.com/Venafi/vcert-python/issues/113)**: Added support for legacy PKCS1 format on private keys when requesting a certificate. Default now is PKCS8 for both TPP and VaaS
25-
* Closed **[Issue 116](https://github.com/Venafi/vcert-python/issues/116)**: Added ability to disable the following Subject fields when creating a policy on VaaS: organizations, org units, localities, states, countries
20+
* Fixed **[Issue 100](https://github.com/Venafi/vcert-python/issues/100)**: Updated behavior for 'serviceGenerated' attribute on CyberArk Certificate Manager, SaaS
21+
* Fixed **[Issue 101](https://github.com/Venafi/vcert-python/issues/101)**: Added support for the following Subject Alternative Names when creating a policy on CyberArk Certificate Manager, SaaS: email, IP, URI
22+
* Closed **[Issue 102](https://github.com/Venafi/vcert-python/issues/102)**: Added support for EC private keys on CyberArk Certificate Manager, SaaS
23+
* Closed **[Issue 108](https://github.com/Venafi/vcert-python/issues/108)**: Added ability to add contacts(CyberArk Certificate Manager, Self-Hosted)/owners(CyberArk Certificate Manager, SaaS) to a policy when is created
24+
* Closed **[Issue 113](https://github.com/Venafi/vcert-python/issues/113)**: Added support for legacy PKCS1 format on private keys when requesting a certificate. Default now is PKCS8 for both CyberArk Certificate Manager, Self-Hosted and CyberArk Certificate Manager, SaaS
25+
* Closed **[Issue 116](https://github.com/Venafi/vcert-python/issues/116)**: Added ability to disable the following Subject fields when creating a policy on CyberArk Certificate Manager, SaaS: organizations, org units, localities, states, countries
2626
* Updated README.md links to work on sites other than GitHub
2727
#### 0.14.0
2828
* Closed **[Issue 90](https://github.com/Venafi/vcert-python/issues/90)**: **Dropped support for Python2. New baseline is Python 3.6+**

examples/get_cert.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python3
22
#
3-
# Copyright 2022 Venafi, Inc.
3+
# Copyright Venafi, Inc. and CyberArk Software Ltd. ("CyberArk")
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.
@@ -40,19 +40,19 @@ def main():
4040
conn = Connection(fake=True)
4141
else:
4242
# Connection will be chosen automatically based on which arguments are passed.
43-
# If token is passed Venafi Cloud connection will be used.
44-
# If user, password, and URL Venafi Platform (TPP) will be used.
43+
# If token is passed CyberArk Certificate Manager, SaaS connection will be used.
44+
# If user, password, and URL CyberArk Certificate Manager, Self-Hosted will be used.
4545
conn = Connection(url=url, token=token, user=user, password=password,
4646
http_request_kwargs={'verify': False})
47-
# If your TPP server certificate signed with your own CA, or available only via proxy, you can specify
47+
# If your CyberArk Certificate Manager, Self-Hosted server certificate signed with your own CA, or available only via proxy, you can specify
4848
# a trust bundle using requests vars:
4949
# conn = Connection(url=url, token=token, user=user, password=password,
5050
# http_request_kwargs={"verify": "/path-to/bundle.pem"})
5151

5252
request = CertificateRequest(common_name=f"{randomword(10)}.venafi.example.com")
5353
request.san_dns = ["www.client.venafi.example.com", "ww1.client.venafi.example.com"]
5454
if not isinstance(conn, CloudConnection):
55-
# Venafi Cloud doesn't support email or IP SANs in CSR
55+
# CyberArk Certificate Manager, SaaS doesn't support email or IP SANs in CSR
5656
request.email_addresses = ["e1@venafi.example.com", "e2@venafi.example.com"]
5757
request.ip_addresses = ["127.0.0.1", "192.168.1.1"]
5858
request.uniform_resource_identifiers = ["http://wgtest.com", "https://ragnartest.com"]

examples/ssh_certificates/get_cert_ssh.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python3
22
#
3-
# Copyright 2021 Venafi, Inc.
3+
# Copyright Venafi, Inc. and CyberArk Software Ltd. ("CyberArk")
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.
@@ -32,15 +32,15 @@ def main():
3232
password = environ.get('TPP_PASSWORD')
3333

3434
connector = venafi_connection(url=url, user=user, password=password, http_request_kwargs={'verify': False})
35-
# If your TPP server certificate is signed with your own CA, or available only via proxy,
35+
# If your CyberArk Certificate Manager, Self-Hosted server certificate is signed with your own CA, or available only via proxy,
3636
# you can specify a trust bundle using requests vars:
3737
# connector = venafi_connection(url=url, api_key=api_key, access_token=access_token,
3838
# http_request_kwargs={"verify": "/path-to/bundle.pem"})
3939

4040
# Create an Authentication object to request a token with the proper scope to manage SSH certificates
4141
auth = Authentication(user=user, password=password, scope=SCOPE_SSH)
4242
# Additionally, you may change the default client id for a custom one
43-
# Make sure this id has been registered on the TPP instance beforehand
43+
# Make sure this id has been registered on the CyberArk Certificate Manager, Self-Hosted instance beforehand
4444
# Also, the user (TTP_USER) should be allowed to use this application
4545
# And the application should have the ssh permissions enabled
4646
auth.client_id = 'vcert-ssh-demo'
@@ -54,8 +54,8 @@ def main():
5454
# without the corresponding private key
5555
ssh_kp = SSHKeyPair()
5656
ssh_kp.generate(key_size=4096, passphrase="foobar")
57-
# The path to the SSH CA in the TPP instance
58-
# This is a placeholder. Make sure an SSH CA already exists on your TPP instance
57+
# The path to the SSH CA in the CyberArk Certificate Manager, Self-Hosted instance
58+
# This is a placeholder. Make sure an SSH CA already exists on your CyberArk Certificate Manager, Self-Hosted instance
5959
cadn = "\\VED\\Certificate Authority\\SSH\\Templates\\my-ca"
6060
# The id of the SSH certificate
6161
key_id = f"vcert-python-{random_word(12)}"
@@ -71,10 +71,10 @@ def main():
7171
# Include the locally-generated public key. If not set, the server will generate one for the certificate
7272
request.set_public_key_data(ssh_kp.public_key())
7373

74-
# Request the certificate from TPP instance
74+
# Request the certificate from CyberArk Certificate Manager, Self-Hosted instance
7575
success = connector.request_ssh_cert(request)
7676
if success:
77-
# Retrieve the certificate from TPP instance
77+
# Retrieve the certificate from CyberArk Certificate Manager, Self-Hosted instance
7878
response = connector.retrieve_ssh_cert(request)
7979
# Save the certificate to a file
8080
# The private and public key are optional values.

examples/ssh_certificates/get_cert_ssh_service.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python3
22
#
3-
# Copyright 2021 Venafi, Inc.
3+
# Copyright Venafi, Inc. and CyberArk Software Ltd. ("CyberArk")
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.
@@ -32,23 +32,23 @@ def main():
3232
password = environ.get('TPP_PASSWORD')
3333

3434
connector = venafi_connection(url=url, user=user, password=password, http_request_kwargs={'verify': False})
35-
# If your TPP server certificate signed with your own CA, or available only via proxy,
35+
# If your CyberArk Certificate Manager, Self-Hosted server certificate signed with your own CA, or available only via proxy,
3636
# you can specify a trust bundle using requests vars:
3737
# connector = venafi_connection(url=url, api_key=api_key, access_token=access_token,
3838
# http_request_kwargs={"verify": "/path-to/bundle.pem"})
3939

4040
# Create an Authentication object to request a token with the proper scope to manage SSH certificates
4141
auth = Authentication(user=user, password=password, scope=SCOPE_SSH)
4242
# Additionally, you may change the default client id for a custom one
43-
# Make sure this id has been registered on the TPP instance beforehand
43+
# Make sure this id has been registered on the CyberArk Certificate Manager, Self-Hosted instance beforehand
4444
# Also, the user (TTP_USER) should be allowed to use this application
4545
# And the application should have the ssh permissions enabled
4646
auth.client_id = 'vcert-ssh-demo'
4747
# Request access token
4848
# After the request is successful, subsequent api calls will use the same token
4949
connector.get_access_token(auth)
5050

51-
# The path to the SSH CA in the TPP instance
51+
# The path to the SSH CA in the CyberArk Certificate Manager, Self-Hosted instance
5252
cadn = "\\VED\\Certificate Authority\\SSH\\Templates\\my-ca"
5353
# The id of the SSH certificate
5454
key_id = f"vcert-python-{random_word(12)}"
@@ -62,14 +62,14 @@ def main():
6262
'permit-pty': ""
6363
}
6464

65-
# Request the certificate from TPP instance
65+
# Request the certificate from CyberArk Certificate Manager, Self-Hosted instance
6666
success = connector.request_ssh_cert(request)
6767
if success:
6868
# Optional. Define a passphrase for encryption
6969
# The service generated private key will be encrypted using this passphrase
7070
# This step should happen after the request has been invoked
7171
request.private_key_passphrase = "foobar"
72-
# Retrieve the certificate from TPP instance
72+
# Retrieve the certificate from CyberArk Certificate Manager, Self-Hosted instance
7373
response = connector.retrieve_ssh_cert(request)
7474
# Save the certificate, private and public key to files
7575
write_ssh_files("/path/to/ssh/cert/folder", response.certificate_details.key_id, response.certificate_data,

0 commit comments

Comments
 (0)