Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: assets-11322 add aio-cli console support for public key rotation #44

Merged
merged 6 commits into from
Jun 14, 2022

Conversation

adamcin
Copy link
Contributor

@adamcin adamcin commented Jun 2, 2022

Description

Add four functions to LibConsoleCLI:

  • getBindingsForWorkspace(orgId, project, workspace): retrieve the list of certificate bindings for the selected workspace
  • uploadAndBindCertificateToWorkspace(orgId, project, workspace, publicKeyPath): upload and bind a public key certificate to the service account of the selected workspace
  • deleteBindingFromWorkspace(orgId, project, workspace, binding): delete a binding (retrieved from getBindingsForWorkspace) from the selected workspace service account
  • getCertificateFingerprint(pemCert): compute x509 fingerprint for provided public key certificate

These functions provide necessary support for aio console:publickey commands introduced by adobe/aio-cli-plugin-console#173

Related Issue

https://jira.corp.adobe.com/browse/ASSETS-11322

Blocked by

https://jira.corp.adobe.com/browse/IOC-4292

adobe/aio-lib-console#33

Motivation and Context

aio console should support workspace public key rotation, in combination with aio certificate:generate.

How Has This Been Tested?

Tested locally with npm linked branches of:

@adobe/aio-lib-console
@adobe/aio-cli-lib-console
@adobe/aio-cli-plugin-console

image

Screenshots (if appropriate):

image

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@codecov
Copy link

codecov bot commented Jun 3, 2022

Codecov Report

Merging #44 (7704750) into master (2775969) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##            master       #44   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            5         5           
  Lines          451       486   +35     
  Branches        75        81    +6     
=========================================
+ Hits           451       486   +35     
Impacted Files Coverage Δ
lib/index.js 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2775969...7704750. Read the comment docs.

@purplecabbage purplecabbage merged commit db3ae4c into adobe:master Jun 14, 2022
@adamcin adamcin deleted the ASSETS-11322 branch June 14, 2022 01:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants