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

Extend Certificate Expiry #825

Open
vikasprasad007 opened this issue Nov 7, 2023 · 5 comments
Open

Extend Certificate Expiry #825

vikasprasad007 opened this issue Nov 7, 2023 · 5 comments
Labels
enhancement New feature or request question General Q&A for product usage
Milestone

Comments

@vikasprasad007
Copy link

Is your feature request related to a problem?

Notation generated test certificate have only 1 day expiry, is there a way to set/extend expiry?

What solution do you propose?

We are demonstrating image signing and verification feature to client but due to 1 day expiry we have to create certificate every day. It would be helpful we we can extend the expiry of certificate.

What alternatives have you considered?

Azure Keyvault..

Any additional context?

No response

@vikasprasad007 vikasprasad007 added enhancement New feature or request triage Need to triage labels Nov 7, 2023
@FeynmanZhou
Copy link
Member

FeynmanZhou commented Nov 9, 2023

Hi @vikasprasad007 ,

The testing key and certificate generated by notation cert generate-test are designed to be short-lived and expired after 1 day for security reasons.

If you are asking for testing purposes, you can re-generate a new test key and cert, or use tool like Azure Key Vault or openssl to generate a test key/cert with a longer expiration.

  • With Azure Key Vault:

See https://learn.microsoft.com/en-us/azure/container-registry/container-registry-tutorial-sign-build-push#create-a-self-signed-certificate-in-akv-azure-cli

  • With openssl:
name=test
openssl req -x509 -sha256 -nodes -newkey rsa:2048 -keyout $name.key -out $name.crt -days 365 -subj "/C=US/ST=WA/L=Seattle/O=Notary/CN=$name" -addext "basicConstraints=CA:false" -addext "keyUsage=critical,digitalSignature" -addext "extendedKeyUsage=codeSigning"

@FeynmanZhou FeynmanZhou added the question General Q&A for product usage label Nov 9, 2023
@vikasprasad007
Copy link
Author

Hello @FeynmanZhou,

Thanks for your response.

We have a plan to implement AKV plugin for production, but we can't do it for now as this plugin is under preview and based on Microsoft it will be publish in 2024 Q1, meanwhile we wants client to review the signing feature.
I have tried to proceed with openssl certificate but when we was trying to add ssl key into notation key list it not allowing us as 'notation key add' command required plugin, even if I tried to pass key_name with direct 'notation sign' command it was not able to find the key.

Request you to please help us with this, we have ssl certificate now how we can add this into notation key list or how can we use this key and cert for signing and verification.
Notation version: 1.0.0

@FeynmanZhou
Copy link
Member

FeynmanZhou commented Nov 14, 2023

Signing with local key is not supported yet but we have an issue #539 to track it. A workaround is to manually edit the signingkeys.json and add the signing key/cert file to signingkeys.json.

We could provide a guideline on FAQ for this case.

@yizha1
Copy link
Contributor

yizha1 commented Nov 27, 2023

@vikasprasad007 Did this workaround solve your problem?

A workaround is to manually edit the [signingkeys.json](https://notaryproject.dev/docs/user-guides/how-to/notation-config-file/#sample-of-signingkeysjson) and add the signing key/cert file to signingkeys.json.

@yizha1 yizha1 removed the triage Need to triage label Dec 5, 2023
Copy link

This issue is stale because it has been opened for 60 days with no activity. Remove stale label or comment. Otherwise, it will be closed in 30 days.

@github-actions github-actions bot added the Stale label Mar 22, 2024
@yizha1 yizha1 added this to the Future milestone Mar 22, 2024
@yizha1 yizha1 removed the Stale label Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question General Q&A for product usage
Projects
Status: Todo
Development

No branches or pull requests

3 participants