Skip to content

Commit d9c0834

Browse files
Merge pull request #72 from vmware-samples/release/v1.6.0
Release/v1.6.0
2 parents f754338 + 06b282b commit d9c0834

File tree

59 files changed

+4066
-41
lines changed

Some content is hidden

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

59 files changed

+4066
-41
lines changed

README.md

Lines changed: 58 additions & 40 deletions
Large diffs are not rendered by default.
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# Set Expiry date for Azure Keyvault Key
2+
3+
This job sets an expiry date which will be 2 years from current date and time for the Azure Keyvault Key.
4+
5+
### Applicable Rule
6+
7+
##### Rule ID:
8+
5c8c26677a550e1fb6560c6e
9+
10+
##### Rule Name:
11+
An encryption key has no scheduled expiration
12+
13+
## Getting Started
14+
### Prerequisites
15+
The provided Azure service principal must have the following permissions:
16+
`Microsoft.Authorization/roleAssignments/write`,
17+
`Microsoft.Authorization/roleAssignments/read`,
18+
`Microsoft.KeyVault/vaults/read`,
19+
`Microsoft.KeyVault/vaults/write`,
20+
`Microsoft.KeyVault/vaults/keys/read`,
21+
`Microsoft.KeyVault/vaults/keys/write`,
22+
`Microsoft.KeyVault/vaults/accessPolicies/write`,
23+
`Microsoft.KeyVault/vaults/keys/update/action`
24+
25+
A sample role with requisite permissions can be found [here](minimum_permissions.json)
26+
27+
More information about already builtin roles and permissions can be found [here](https://docs.microsoft.com/en-us/azure/role-based-access-control/built-in-roles)
28+
29+
### Running the script
30+
You may run this script using following commands:
31+
32+
```shell script
33+
pip install -r requirements.txt
34+
python3 azure_key_vault_expiry_date_set_for_all_keys.py
35+
```
36+
## Running the tests
37+
You may run test using following command under vss-remediation-worker-job-code-python directory:
38+
39+
```shell script
40+
pip install -r requirements-dev.txt
41+
python3 -m pytest test
42+
```
43+
## Deployment
44+
Provision an instance by creating an Azure Virtual Machine to use for the worker. The minimum required specifications are 128 MB memory and 1/2 Core CPU.
45+
Setup Docker on newly provisioned Azure Virtual Machine instance.You can refer to the [docs here](https://docs.microsoft.com/en-us/previous-versions/azure/virtual-machines/linux/docker-machine) for more information.
46+
Deploy the worker docker image by SSH into the Azure Virtual Machine instance and run the following commands:
47+
```shell script
48+
docker run --rm -it --name {worker_name}\
49+
-e VSS_CLIENT_ID={ENTER CLIENT ID}\
50+
-e VSS_CLIENT_SECRET={ENTER CLIENT SECRET}\
51+
-e AZURE_CLIENT_ID={ENTER AZURE_CLIENT_ID} \
52+
-e AZURE_CLIENT_SECRET={ENTER AZURE_CLIENT_SECRET} \
53+
-e AZURE_TENANT_ID={ENTER AZURE_TENANT_ID} \
54+
vmware/vss-remediation-worker:latest-python
55+
```
56+
## Contributing
57+
The Secure State team welcomes contributions from the community. If you wish to contribute code and you have not signed our contributor license agreement (CLA), our bot will update the issue when you open a Pull Request. For any questions about the CLA process, please refer to our [FAQ](https://cla.vmware.com/faq).
58+
59+
All contributions to this repository must be signed as described on that page. Your signature certifies that you wrote the patch or have the right to pass it on as an open-source patch.
60+
61+
For more detailed information, refer to [CONTRIBUTING.md](../../../CONTRIBUTING.md).
62+
## Versioning
63+
We use SemVer for versioning. For the versions available, see the tags on this repository.
64+
65+
## Authors
66+
* **VMware Secure State** - *Initial work*
67+
See also the list of [contributors](https://github.com/vmware-samples/secure-state-remediation-jobs/graphs/contributors) who participated in this project.
68+
69+
## License
70+
This project is licensed under the Apache License - see the [LICENSE](https://github.com/vmware-samples/secure-state-remediation-jobs/blob/master/LICENSE.txt) file for details

remediation_worker/jobs/azure_key_vault_expiry_date_set_for_all_keys/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)