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

How to unset Mail-setting when creating new acme-issuer #321

Open
tom-wegener opened this issue Dec 9, 2024 · 1 comment
Open

How to unset Mail-setting when creating new acme-issuer #321

tom-wegener opened this issue Dec 9, 2024 · 1 comment
Labels
question Further information is requested

Comments

@tom-wegener
Copy link

Thank you for your library, it helped us a lot.

What is your question?

We are integrated certmagic as library to allow customers to work with their CAs but at the moment the email setting for the AcmeIssuer gets reused when setting it to an empty string, is this intentional? And if yes, how can we deactivate it?

What have you already tried?

setting the Email attribute to empty string as in:

magicConfig := certmagic.New(cache, *customConfig)

customIssuer := certmagic.ACMEIssuer{
	Agreed:               true,
	Email:                "",
	CA:                   config.AcmeServer,
	CertObtainTimeout:    20 * time.Second,
	DisableHTTPChallenge: true,
}

magicConfig.Issuers = []certmagic.Issuer{certmagic.NewACMEIssuer(magic, customIssuer)}
magicConfig.ManageSync(ctx, []string{Hostname})

Include any other information or discussion.

certmagic v0.20.0 but we are okay with upgrading, I just didn't find anything usefule for this problem in the changelog.

Bonus: What do you use this package for, and does it help you?

As a library to allow users to set their own certificates.

@tom-wegener tom-wegener added the question Further information is requested label Dec 9, 2024
@mholt
Copy link
Member

mholt commented Dec 9, 2024

Best practice is to always provide an email address if possible, so CertMagic will look in storage for the most recently used email address and use that, if the email field is blank. You would have to delete previous ACME accounts (not recommended! account creation is tightly rate limited with Let's Encrypt, and a bit annoying at all other CAs).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants