Skip to content

allow subdomains of identitysandbox.gov to work#11767

Merged
timothy-spencer merged 11 commits intomainfrom
tspencer/allowsubdomains
Jan 17, 2025
Merged

allow subdomains of identitysandbox.gov to work#11767
timothy-spencer merged 11 commits intomainfrom
tspencer/allowsubdomains

Conversation

@timothy-spencer
Copy link
Contributor

@timothy-spencer timothy-spencer commented Jan 16, 2025

🛠 Summary of changes

This makes it so that we are not required to have LOGIN_DOMAIN set to identitysandbox.gov for certain things to happen, so we can use things like tooling.identitysandbox.gov and have newrelic/prefill_otp_codes_allowed_in_sandbox/current_env_allowed_to_see_gpo_code config work.

📜 Testing Plan

Provide a checklist of steps to confirm the changes.

  • Create image with this PR
  • Test the image in the loadtest k8s environment, which uses tooling.identitysandbox.gov for it's LOGIN_DOMAIN
  • Test the image in one of the sandbox k8s environments.
  • Dance!

@timothy-spencer timothy-spencer changed the title allow subdomains of identitysandbox.gov to work WIP: allow subdomains of identitysandbox.gov to work Jan 16, 2025
@timothy-spencer timothy-spencer changed the title WIP: allow subdomains of identitysandbox.gov to work allow subdomains of identitysandbox.gov to work Jan 17, 2025
Copy link
Contributor

@jgrevich jgrevich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That works!


def self.prefill_otp_codes_allowed_in_sandbox?
Identity::Hostdata.domain == 'identitysandbox.gov' && telephony_test_adapter?
Identity::Hostdata.domain.end_with?('identitysandbox.gov') && telephony_test_adapter?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor risk, but we should probably do something so that abcidentitysandbox.gov doesn't work

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't think that this was really going to be a problem, because the real thing that we are looking for is that it's not login.gov, but if you do, I'll put that in. :-)

@timothy-spencer timothy-spencer merged commit 73795c9 into main Jan 17, 2025
@timothy-spencer timothy-spencer deleted the tspencer/allowsubdomains branch January 17, 2025 19:28
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.

4 participants