feat(access): Allow verified email domains - #227
Conversation
Operators can grant visitor access to every verified address on an exact email domain. Subdomains and suffix lookalikes remain outside the allowlist.
Code Review Summary✨ Adds exact-domain entries to the visitor access allowlist. In 🚀 Key Improvements
|
| return err == nil && strings.EqualFold(address.Address, value) | ||
| } | ||
|
|
||
| func ValidAllowlistEntry(value string) bool { |
There was a problem hiding this comment.
ValidAllowlistEntry is the shared validator for the new @domain form, but its accepted grammar is not documented. In YAML specifically, a leading @ is a reserved indicator, so - @flatrun.dev in service.yml fails to parse; operators must quote it as - "@flatrun.dev". Record the accepted forms and the quoting requirement next to the validator so producers use it correctly.
| func ValidAllowlistEntry(value string) bool { | |
| // ValidAllowlistEntry reports whether value is a usable allowlist entry: either | |
| // a full email address, or an "@domain" entry that grants every verified address | |
| // on that exact domain (subdomains excluded). Matches are case-insensitive, and | |
| // because "@" is a reserved YAML indicator domain entries must be quoted in | |
| // service.yml, e.g. - "@example.com". | |
| func ValidAllowlistEntry(value string) bool { |
Manual YAML configurations now state that domain entries need quotes around the leading at sign.
Allow operators to grant visitor access to every verified address on an exact email domain. Subdomains and suffix lookalikes remain excluded. Requests outside the allowlist receive the same response without sending a verification link, so the configured domains are not disclosed.