Skip to content

[Bug]: ACME server does not enforce termsOfServiceAgreed when termsOfService is configuredΒ #2539

@vkosuri

Description

@vkosuri

Steps to Reproduce

  1. Initialize step-ca with an ACME provisioner.
  2. Edit ca.json to set termsOfService in the ACME provisioner, then restart step-ca.
  3. Verify the ACME directory includes meta.termsOfService.
  4. Create a new ACME account with termsOfServiceAgreed set to false or omitted.
  5. Observe that the server still creates the account.

Your Environment

OS: Oracle Linux Server 8.10 (linux/amd64)
step-ca: Smallstep CA/0.28.4 (Release: 2025-07-14T14:06:51Z)
Kernel/Platform: platform:el8

Expected Behavior

When an ACME provisioner is configured with a termsOfService URL, the server should reject newAccount requests that do not set termsOfServiceAgreed: true, per RFC 8555 Β§7.3.3, returning an ACME problem with type userActionRequired and pointing to the terms URL.

Actual Behavior

  • The server advertises meta.termsOfService in the directory.
  • New ACME accounts are created even when termsOfServiceAgreed is false or omitted; no userActionRequired error is returned.

Additional Context

RFC: https://datatracker.ietf.org/doc/html/rfc8555#section-7.3.3

Code paths:

  1. Directory meta includes termsOfService via provisioner: acme/api/handler.go (GetDirectory β†’ createMetaObject)
  2. Provisioner field: authority/provisioner/acme.go (TermsOfService string)
  3. Missing enforcement in new-account: acme/api/account.go (NewAccount) β€” nar.Validate() only checks contacts; there is no check for prov.TermsOfService != "" && !nar.TermsOfServiceAgreed

Related prior work: PR #1136 added directory meta fields but did not add enforcement.

Proposed fix (brief): In acme/api/account.go::NewAccount, after nar.Validate() and loading the provisioner:

if prov.TermsOfService != "" and nar.TermsOfServiceAgreed != true, 
    return acme.ErrorUserActionRequiredType    # with a detail message including the terms URL.

Contributing

Vote on this issue by adding a πŸ‘ reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugneeds triageWaiting for discussion / prioritization by team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions