caddyserver / caddyserver/certmagic

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

Open
#321 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

question
Dominant language
Go
Stars
5.6k
Forks
354
Avg merge
9d 23h
Merged PRs (30d)
3

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing certmagic.NewACMEIssuer and how ACMEIssuer.Email is handled in the current version; the issue provides a reproducible configuration using an empty Email value. Check whether the existing behavior is intentional and how email can be disabled. Done means the behavior or supported configuration is clarified, with the issue's empty-string case addressed.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
backend, security
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.