Skip to content

Grant TECH_CONTACT role to new OT&E console users - #3276

Open
CydeWeys wants to merge 1 commit into
google:masterfrom
CydeWeys:fix-ote-tech-contact-role
Open

CydeWeys wants to merge 1 commit into
google:masterfrom
CydeWeys:fix-ote-tech-contact-role

Conversation

@CydeWeys

@CydeWeys CydeWeys commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Update OteAccountBuilder.addUser to grant RegistrarRole.TECH_CONTACT
("Editor") instead of RegistrarRole.ACCOUNT_MANAGER ("Viewer") across
all provisioned OT&E registrars so new OT&E console users hold
EDIT_REGISTRAR_DETAILS and can self-service configure mTLS client
certificates and IP allowlists via SecurityAction.

Also update ConsoleOteAction.getHandler to check
ConsolePermission.CHECK_ONBOARDING_STATUS via checkPermission (allowing
both global support roles and per-registrar TECH_CONTACT/PRIMARY_CONTACT
users to check OT&E status while returning 403 Forbidden for
unauthorized or disabled registrars) and validate Registrar.Type.OTE
before parsing the base registrar ID.

Update OteAccountBuilderTest and ConsoleOteActionTest to verify
TECH_CONTACT provisioning, self-service SecurityAction certificate and
IP allowlist updates, and ConsoleOteAction GET/POST authorization.

Background: how OT&E users lost self-service access

  • Remove GAE Users service API usage #2414 (May 2024) removed the GAE Users API. After that, the
    RegistrarPoc login contacts created by the old
    OteAccountBuilder.addContact no longer granted any console access.
  • Create Users when setting up OT&E and Production registrars #2488 (July 2024) switched OteAccountBuilder to create console
    Users and gave them RegistrarRole.ACCOUNT_MANAGER on all four OT&E
    registrars (-1, -3, -4, -5). At the time this was harmless:
    the legacy registrar console mapped any registrar role to OWNER,
    and OWNER could edit certificates and IP allowlists.
  • Delete legacy console #2579 (October 2024) deleted the legacy console. The new console's
    SecurityAction requires the per-registrar EDIT_REGISTRAR_DETAILS
    permission, which ACCOUNT_MANAGER ("Viewer") does not have. From
    that point, newly created OT&E users could no longer upload their own
    certificates or IP allowlists.

Since then, support has worked around this by hand. After every
"Generate OT&E Account" run, they open the console Users page on each of
the four OT&E registrars and change the generated user from "Viewer" to
"Editor" (TECH_CONTACT). If that step is missed, the registrar is
locked out of self-service certificate and IP setup and has to ask
support again. Related manual repairs of OT&E console users are tracked
in http://b/435167780.

Risk and scope

This change grants no access beyond what support already gives every
OT&E user by hand today. It removes four manual role edits per
onboarding.

  • Non-production only. OteAccountBuilder and
    ConsoleOteAction.postHandler both fail with checkState in
    PRODUCTION.
  • Only the four synthetic OT&E registrars. The role is granted only
    on the generated Registrar.Type.OTE registrars. The user has
    globalRole = NONE and isAdmin = false, and gets no role on any
    other registrar.
  • Per-registrar, not global. TECH_CONTACT grants
    EDIT_REGISTRAR_DETAILS on those registrars only. Actions that need
    the global permission still return 403: changing allowedTlds,
    changing registryLockAllowed (MANAGE_REGISTRARS), and creating
    OT&E accounts (POST /console-api/ote).
  • Still blocked for TECH_CONTACT: managing console users
    (MANAGE_USERS, PRIMARY_CONTACT only), changing the set of ADMIN
    (primary) contacts, and completing an EPP password reset. A
    TECH_CONTACT can request a reset, but the link goes to the ADMIN
    contact and verifying it requires MANAGE_USERS.
  • What TECH_CONTACT does add on these OT&E registrars: editing the
    certificate and IP allowlist, non-ADMIN contacts, and RDAP fields;
    changing the EPP password (requires the current password); and bulk
    domain deletes (EXECUTE_EPP_COMMANDS). Registry Lock stays
    unavailable because registryLockAllowed defaults to false.

BUG= http://b/586480144


This change is Reviewable

Update OteAccountBuilder.addUser to grant RegistrarRole.TECH_CONTACT
("Editor") instead of RegistrarRole.ACCOUNT_MANAGER ("Viewer") across
all provisioned OT&E registrars so new OT&E console users hold
EDIT_REGISTRAR_DETAILS and can self-service configure mTLS client
certificates and IP allowlists via SecurityAction.

Also update ConsoleOteAction.getHandler to check
ConsolePermission.CHECK_ONBOARDING_STATUS via checkPermission (allowing
both global support roles and per-registrar TECH_CONTACT/PRIMARY_CONTACT
users to check OT&E status while returning 403 Forbidden for
unauthorized or disabled registrars) and validate Registrar.Type.OTE
before parsing the base registrar ID.

Update OteAccountBuilderTest and ConsoleOteActionTest to verify
TECH_CONTACT provisioning, self-service SecurityAction certificate and
IP allowlist updates, and ConsoleOteAction GET/POST authorization.

BUG= http://b/586480144
@CydeWeys
CydeWeys force-pushed the fix-ote-tech-contact-role branch from 319518b to 1134ece Compare November 18, 2026 21:55
@CydeWeys

Copy link
Copy Markdown
Member Author

What are the risks of this change? Might we be unintentionally granting users more access than expected? EDIT_REGISTRAR_DETAILS is a pretty significant permission, no? Or are we not so concerned as this only affects sandbox?

@CydeWeys

Copy link
Copy Markdown
Member Author

Good question. Short answer: this grants no access beyond what support
already gives every OT&E user by hand today, and it only applies in
sandbox, to the four generated OT&E registrars.

Why the change is needed

  • Create Users when setting up OT&E and Production registrars #2488 (July 2024) made OteAccountBuilder create console users with
    ACCOUNT_MANAGER ("Viewer") on the four OT&E registrars (-1, -3,
    -4, -5). That was harmless then, because the legacy console
    treated any registrar role as OWNER, which could edit certificates
    and IP allowlists.
  • Delete legacy console #2579 (October 2024) deleted the legacy console. The new console's
    SecurityAction checks the per-registrar EDIT_REGISTRAR_DETAILS
    permission, which "Viewer" doesn't have. New OT&E users have been
    unable to upload their own certificates or IP allowlists ever since.
  • The current workaround: after every "Generate OT&E Account" run,
    support opens the Users page on each of the four OT&E registrars and
    changes the generated user from "Viewer" to "Editor" (TECH_CONTACT).
    If that step is missed, the registrar is locked out of self-service
    setup and has to come back to support. This PR makes TECH_CONTACT
    the default and removes those four manual edits per onboarding.

What limits the risk

  • Sandbox only. OteAccountBuilder and
    ConsoleOteAction.postHandler both fail with checkState in
    PRODUCTION.
  • Only the four generated OT&E registrars. The role is granted only
    on those Registrar.Type.OTE registrars. The user has
    globalRole = NONE and isAdmin = false, and gets no role on any
    other registrar.
  • Per-registrar, not global. You're right that
    EDIT_REGISTRAR_DETAILS matters, but the dangerous uses check the
    global permission, and those still return 403: changing
    allowedTlds, changing registryLockAllowed (MANAGE_REGISTRARS),
    and creating OT&E accounts (POST /console-api/ote). The new
    ConsoleOteActionTest covers that last case.
  • Still blocked for TECH_CONTACT: managing console users
    (MANAGE_USERS), changing the set of ADMIN (primary) contacts, and
    completing an EPP password reset. It can request a reset, but the
    link goes to the ADMIN contact and verifying it requires
    MANAGE_USERS.

What TECH_CONTACT does add, on those four OT&E registrars only:
editing the certificate and IP allowlist (the point of this change),
non-ADMIN contacts, and RDAP fields; changing the EPP password (needs
the current password); and bulk domain deletes. Support already grants
all of this by hand, since "Editor" in the console is exactly
TECH_CONTACT. Registry Lock stays unavailable because
registryLockAllowed defaults to false on OT&E registrars.

More context is in http://b/586480144.

@CydeWeys
CydeWeys requested a review from ptkach November 18, 2026 23:23
@CydeWeys
CydeWeys enabled auto-merge November 18, 2026 23:23

This branch has not been deployed

No deployments
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.

1 participant