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: log if WithCAEndpoint(DefaultCATestEndpoint) #33

Merged
merged 2 commits into from
Jan 13, 2025

Conversation

lidel
Copy link
Contributor

@lidel lidel commented Jan 8, 2025

This PR implements idea from
libp2p/go-libp2p#3103 (comment) to ensure users who set up staging endpoint for testing are always aware of it and never ship test config to production.

Demo

Run p2p-forge/client WithCAEndpoint(DefaultCATestEndpoint), it will log ERROR:

2025-01-08T20:31:08.330+0100 ERROR example.autotls client/acme.go:245 initialized WithCAEndpoint(DefaultCATestEndpoint) (https://acme-staging-v02.api.letsencrypt.org/directory): certificate will be issued for staging purposes and won't work correctly in web browser; make sure to change to WithCAEndpoint(DefaultCAEndpoint) (https://acme-v02.api.letsencrypt.org/directory) before deploying to production or testing in web browser

this implements idea from
libp2p/go-libp2p#3103 (comment)
to ensure users who set up staging endpoint for testing
are always aware fo it and never ship it to production
@lidel lidel requested a review from 2color January 8, 2025 19:35
client/acme.go Outdated Show resolved Hide resolved
Co-authored-by: Daniel Norman <[email protected]>
@lidel lidel merged commit 41ec946 into main Jan 13, 2025
4 checks passed
@lidel lidel deleted the feat/log-error-when-staging-ca-used branch January 13, 2025 15:51
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