Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
9c4795e
remove portal subpath
jdettmannnava Dec 11, 2025
39ebf03
different smoke paths for portal based on env
jdettmannnava Dec 11, 2025
7837af4
Merge branch 'main' into jd/dpc-4428-remove-portal-path
jdettmannnava Dec 12, 2025
592c853
Merge branch 'main' into jd/dpc-4428-remove-portal-path
jdettmannnava Dec 16, 2025
f50e6ff
Merge branch 'main' into jd/dpc-4428-remove-portal-path
jdettmannnava Dec 17, 2025
44a5b9b
Merge branch 'main' into jd/dpc-4428-remove-portal-path
jdettmannnava Dec 22, 2025
b7107be
Merge branch 'main' into jd/dpc-4428-remove-portal-path
jdettmannnava Dec 22, 2025
34b4cb0
Merge branch 'main' into jd/dpc-4428-remove-portal-path
jdettmannnava Dec 24, 2025
c768802
Merge branch 'main' into jd/dpc-4428-remove-portal-path
jdettmannnava Dec 29, 2025
39a02db
Merge branch 'main' into jd/dpc-4428-remove-portal-path
jdettmannnava Dec 30, 2025
97ce679
Merge branch 'main' into jd/dpc-4428-remove-portal-path
jdettmannnava Dec 31, 2025
9330e20
Merge branch 'main' into jd/dpc-4428-remove-portal-path
jdettmannnava Dec 31, 2025
3df9890
Merge branch 'main' into jd/dpc-4428-remove-portal-path
jdettmannnava Jan 12, 2026
abe6459
Merge branch 'main' into jd/dpc-4428-remove-portal-path
jdettmannnava Jan 13, 2026
eeabd78
Merge branch 'main' into jd/dpc-4428-remove-portal-path
jdettmannnava Jan 14, 2026
39b613c
Merge branch 'main' into jd/dpc-4428-remove-portal-path
jdettmannnava Jan 21, 2026
0b0ecdb
Merge branch 'main' into jd/dpc-4428-remove-portal-path
jdettmannnava Jan 22, 2026
d02cdcf
Merge branch 'main' into jd/dpc-4428-remove-portal-path
jdettmannnava Jan 23, 2026
dda3b61
Merge branch 'main' into jd/dpc-4428-remove-portal-path
jdettmannnava Jan 23, 2026
56f5d81
Merge branch 'main' into jd/dpc-4428-remove-portal-path
jdettmannnava Jan 26, 2026
ee7d024
Merge branch 'main' into jd/dpc-4428-remove-portal-path
jdettmannnava Jan 27, 2026
c42012b
Merge branch 'main' into jd/dpc-4428-remove-portal-path
jdettmannnava Jan 27, 2026
cae09af
Merge branch 'main' into jd/dpc-4428-remove-portal-path
jdettmannnava Jan 29, 2026
a19675f
Merge branch 'main' into jd/dpc-4428-remove-portal-path
jdettmannnava Feb 3, 2026
e535e91
Merge branch 'main' into jd/dpc-4428-remove-portal-path
jdettmannnava Feb 3, 2026
1ca9275
Merge branch 'main' into jd/dpc-4428-remove-portal-path
jdettmannnava Feb 4, 2026
daceb5d
Merge branch 'main' into jd/dpc-4428-remove-portal-path
jdettmannnava Feb 5, 2026
4ae7cce
update test
jdettmannnava Feb 5, 2026
fb2c933
Merge branch 'main' into jd/dpc-4428-remove-portal-path
jdettmannnava Feb 9, 2026
abe8cbe
Merge branch 'main' into jd/dpc-4428-remove-portal-path
jdettmannnava Feb 10, 2026
ec05130
Merge branch 'main' into jd/dpc-4428-remove-portal-path
jdettmannnava Feb 12, 2026
ad115e4
Merge branch 'main' into jd/dpc-4428-remove-portal-path
jdettmannnava Feb 13, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docker-compose.portals.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ services:
db:
condition: service_healthy
healthcheck:
test: curl --fail http://localhost:3100/portal/health_check || exit 1
test: curl --fail http://localhost:3100/health_check || exit 1
interval: 10s
timeout: 5s
start_period: 30s
Expand Down
4 changes: 2 additions & 2 deletions dpc-load-testing/smoke_test_workflows/portals.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ const portals = {
protectedPath: 'organizations/foo/edit',
signInText: 'Log in' },
'portal': { envs: ['local', 'dev', 'test'],
signInPath: 'portal/users/sign_in',
protectedPath: 'portal/organizations',
signInPath: __ENV.ENVIRONMENT == 'local' ? 'users/sign_in' : 'portal/users/sign_in',
protectedPath: 'organizations',
signInText: 'Sign in' },
}

Expand Down
2 changes: 1 addition & 1 deletion dpc-portal/app/controllers/invitations_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def login
path: '/openid_connect/authorize',
query: { acr_values: 'http://idmanagement.gov/ns/assurance/ial/2',
client_id: IDP_CLIENT_ID,
redirect_uri: "#{my_protocol_host}/portal/users/auth/openid_connect/callback",
redirect_uri: "#{my_protocol_host}/users/auth/openid_connect/callback",
response_type: 'code',
scope: 'openid email all_emails profile social_security_number',
nonce: @nonce,
Expand Down
1 change: 0 additions & 1 deletion dpc-portal/config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ class Application < Rails::Application

# Set the relative_url_root at runtime, which will be used in various places
# to ensure that we are serving everything under the portal scope.
config.relative_url_root = '/portal'

# Configuration for the application, engines, and railties goes here.
#
Expand Down
2 changes: 1 addition & 1 deletion dpc-portal/config/initializers/devise.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
host: idp_host,
identifier: "urn:gov:cms:openidconnect.profiles:sp:sso:cms:dpc:#{ENV['ENV']}",
private_key: private_key,
redirect_uri: "#{my_protocol_host}/portal/users/auth/openid_connect/callback"
redirect_uri: "#{my_protocol_host}/users/auth/openid_connect/callback"
}
}
# The secret key used by Devise. Devise uses this key to generate
Expand Down
6 changes: 0 additions & 6 deletions dpc-portal/config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,6 @@
# Defines the root path route ("/")
root 'organizations#index'

# Route /portal to the main controller. This is a necessary workaround since
# Lookbook mimics requests from the root_path, which will return /portal.
# However, to complete the mimicing, it uses the Rails.application.routes.recognize_path
# method, which does not work correctly for applications served on a subpath.
match '/portal', to: 'organizations#index', via: :get

resources :organizations, only: [:index, :show, :new, :create] do
resources :client_tokens, only: [:new, :create, :destroy]
resources :public_keys, only: [:new, :create, :destroy]
Expand Down
2 changes: 1 addition & 1 deletion dpc-portal/lib/tasks/dpc.rake
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace :dpc do
invitation = service.create_invitation(ao_given_name, ao_family_name, ao_email, org_npi)
puts "Invitation created for #{ao_given_name} #{ao_family_name} for #{invitation.provider_organization.name}"
if Rails.env.development?
puts "http://localhost:3100/portal/organizations/#{invitation.provider_organization.id}/invitations/#{invitation.id}/accept"
puts "http://localhost:3100/organizations/#{invitation.provider_organization.id}/invitations/#{invitation.id}/accept"
end
rescue AoInvitationServiceError => e
puts "Unable to create invitation: #{e.message}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
let(:expected_html) do
<<~HTML
<svg class="usa-icon" style="transform: scale(1)" aria-hidden="true" role="img">
<use xlink:href=/portal/assets/@uswds/uswds/dist/img/sprite-9865eea7b251e43137fb770626d6cd51c474a3a436678a6e66cafce50968076f.svg#lock></use>
<use xlink:href=/assets/@uswds/uswds/dist/img/sprite-9865eea7b251e43137fb770626d6cd51c474a3a436678a6e66cafce50968076f.svg#lock></use>
</svg>
HTML
end
Expand All @@ -29,7 +29,7 @@
let(:expected_html) do
<<~HTML
<svg class="usa-icon" style="transform: scale(2)" aria-hidden="true" role="img">
<use xlink:href=/portal/assets/@uswds/uswds/dist/img/sprite-9865eea7b251e43137fb770626d6cd51c474a3a436678a6e66cafce50968076f.svg#circle_check></use>
<use xlink:href=/assets/@uswds/uswds/dist/img/sprite-9865eea7b251e43137fb770626d6cd51c474a3a436678a6e66cafce50968076f.svg#circle_check></use>
</svg>
HTML
end
Expand All @@ -41,7 +41,7 @@
let(:expected_html) do
<<~HTML
<svg class="foo bar usa-icon" style="transform: scale(1)" aria-hidden="true" role="img">
<use xlink:href=/portal/assets/@uswds/uswds/dist/img/sprite-9865eea7b251e43137fb770626d6cd51c474a3a436678a6e66cafce50968076f.svg#lock></use>
<use xlink:href=/assets/@uswds/uswds/dist/img/sprite-9865eea7b251e43137fb770626d6cd51c474a3a436678a6e66cafce50968076f.svg#lock></use>
</svg>
HTML
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<form class="button_to" method="post" action="/foo/bar/some-guid"><input type="hidden" name="_method" value="delete" autocomplete="off" /><button class="usa-button" type="submit">Yes, revoke component</button></form>
HTML
end
let(:expected_icon) { '<use xlink:href=/portal/assets/@uswds/uswds/dist/img/sprite.*svg\#delete></use>' }
let(:expected_icon) { '<use xlink:href=/assets/@uswds/uswds/dist/img/sprite.*svg\#delete></use>' }
it { is_expected.to include(expected_form) }
it { is_expected.to match(expected_icon) }
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
let(:expected_html) do
<<~HTML
<div>
<div class="margin-bottom-5">← <a href="/portal/organizations/#{org.path_id}">Back to organization</a></div>
<div class="margin-bottom-5">← <a href="/organizations/#{org.path_id}">Back to organization</a></div>
<h1>Create a new client token</h1>
<div>
<h2>New token for #{org.name}</h2>
<hr/>
<form action="/portal/organizations/#{org.path_id}/client_tokens" accept-charset="UTF-8" method="post">
<form action="/organizations/#{org.path_id}/client_tokens" accept-charset="UTF-8" method="post">
<div class="margin-bottom-4">
<label class="usa-label" for="label">Label</label>
<p class="text-base-darker">Choose a descriptive name to make your token easily identifiable to you.</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
let(:expected_html) do
<<~HTML
<div>
<div class="margin-top-5 margin-bottom-5">← <a href="/portal/organizations/#{org.path_id}?credential_start=true">Back to organization</a></div>
<div class="margin-top-5 margin-bottom-5">← <a href="/organizations/#{org.path_id}?credential_start=true">Back to organization</a></div>
<h1>Client token created</h1>
<div>
<h2>"Your token" created for #{org.name}</h2>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<h2>Credential delegates</h2>
</div>
<div class="flex-align-self-center">
<form class="button_to" method="get" action="/portal/organizations/#{org.path_id}/credential_delegate_invitations/new"><button class="usa-button" type="submit">Assign CD</button></form>
<form class="button_to" method="get" action="/organizations/#{org.path_id}/credential_delegate_invitations/new"><button class="usa-button" type="submit">Assign CD</button></form>
</div>
</div>
<hr />
Expand Down Expand Up @@ -143,7 +143,7 @@
<td data-sort-value="bob@example.com">bob@example.com</td>
HTML
delete_invitation = <<~HTML
<form class="button_to" method="post" action="/portal/organizations/2/credential_delegate_invitations/3">
<form class="button_to" method="post" action="/organizations/2/credential_delegate_invitations/3">
<input type="hidden" name="_method" value="delete" autocomplete="off" />
<button class="usa-button" type="submit">Yes, delete invite</button>
</form>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

it 'should match form tag' do
form_tag = ['<form class="usa-form" id="cd-form"',
%(action="/portal/organizations/#{org.path_id}/credential_delegate_invitations"),
%(action="/organizations/#{org.path_id}/credential_delegate_invitations"),
'accept-charset="UTF-8" method="post">'].join(' ')
is_expected.to include(form_tag)
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
let(:ao_invite) { Invitation.new(id: 5, invitation_type: :authorized_official) }
let(:component) { described_class.new(org, ao_invite, given_name, family_name) }
it 'should match form method and action' do
form_url = "/portal/organizations/#{org.path_id}/invitations/#{ao_invite.id}/confirm"
form_url = "/organizations/#{org.path_id}/invitations/#{ao_invite.id}/confirm"
form_method_action = %(method="post" action="#{form_url}")
is_expected.to include(form_method_action)
end
Expand All @@ -40,7 +40,7 @@
let(:cd_invite) { Invitation.new(id: 6, invitation_type: :credential_delegate) }
let(:component) { described_class.new(org, cd_invite, given_name, family_name) }
it 'should match form method and action' do
form_url = "/portal/organizations/#{org.path_id}/invitations/#{cd_invite.id}/register"
form_url = "/organizations/#{org.path_id}/invitations/#{cd_invite.id}/register"
form_method_action = %(method="post" action="#{form_url}")
is_expected.to include(form_method_action)
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
let(:reason) { 'fail_to_proof' }
it 'should have url to login' do
path = "organizations/#{invitation.provider_organization.id}/invitations/#{invitation.id}/login"
url = "http://test.host/portal/#{path}"
url = "http://test.host/#{path}"
expect(page.find('form')[:action]).to eq url
expect(page.find('form')[:method]).to eq 'post'
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

it 'should post to appropriate url' do
path = "organizations/#{provider_organization.id}/invitations/#{invitation.id}/login"
url = "http://test.host/portal/#{path}"
url = "http://test.host/#{path}"
expect(page.find('form')[:action]).to eq url
expect(page.find('form')[:method]).to eq 'post'
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
describe 'cd' do
let(:invitation) { create(:invitation, :cd) }
it 'should post to register' do
expected = "/portal/organizations/#{invitation.provider_organization.id}/invitations/#{invitation.id}/register"
expected = "/organizations/#{invitation.provider_organization.id}/invitations/#{invitation.id}/register"
form = page.find('form')
expect(form[:action]).to eq expected
end
Expand All @@ -27,7 +27,7 @@
end

it 'should post to register' do
expected = "/portal/organizations/#{invitation.provider_organization.id}/invitations/#{invitation.id}/register"
expected = "/organizations/#{invitation.provider_organization.id}/invitations/#{invitation.id}/register"
form = page.find('form')
expect(form[:action]).to eq expected
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
end

it 'should go to accept page' do
expected = "/portal/organizations/#{invitation.provider_organization.id}/invitations/#{invitation.id}/accept"
expected = "/organizations/#{invitation.provider_organization.id}/invitations/#{invitation.id}/accept"
form = page.find('form')
expect(form[:action]).to eq expected
end
Expand Down Expand Up @@ -62,7 +62,7 @@
end

it 'should go to confirm_cd page' do
expected = "/portal/organizations/#{invitation.provider_organization.id}/invitations/#{invitation.id}/confirm_cd"
expected = "/organizations/#{invitation.provider_organization.id}/invitations/#{invitation.id}/confirm_cd"
form = page.find('form')
expect(form[:action]).to eq expected
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@
let(:expected_html) do
<<~HTML
<div>
<div class="margin-bottom-5">← <a href="/portal/organizations/#{org.path_id}">Back to organization</a></div>
<div class="margin-bottom-5">← <a href="/organizations/#{org.path_id}">Back to organization</a></div>
<h1>Add public IP address</h1>
<section class="box">
<div>
<p>Limit of 8 addresses per organization.</p>
<h2>New IP address for #{org.name}</h2>
<form action="/portal/organizations/#{org.path_id}/ip_addresses" accept-charset="UTF-8" method="post">
<form action="/organizations/#{org.path_id}/ip_addresses" accept-charset="UTF-8" method="post">
<div class="margin-bottom-4">
<label class="usa-label" for="label">Label</label>
<p class="text-base-darker">Choose a descriptive name to make your IP address easily identifiable to you.</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,23 @@
let(:org) { ComponentSupport::MockOrg.new(0) }
it 'Should have Generate token button' do
button = <<~BUTTON
<form class="button_to" method="get" action="/portal/organizations/#{org.path_id}/client_tokens/new">
<form class="button_to" method="get" action="/organizations/#{org.path_id}/client_tokens/new">
<button class="usa-button" type="submit">Generate token</button>
</form>
BUTTON
is_expected.to include(normalize_space(button))
end
it 'Should have Create key button' do
button = <<~BUTTON
<form class="button_to" method="get" action="/portal/organizations/#{org.path_id}/public_keys/new">
<form class="button_to" method="get" action="/organizations/#{org.path_id}/public_keys/new">
<button class="usa-button" type="submit">Create key</button>
</form>
BUTTON
is_expected.to include(normalize_space(button))
end
it 'Should have Add IP button' do
button = <<~BUTTON
<form class="button_to" method="get" action="/portal/organizations/#{org.path_id}/ip_addresses/new">
<form class="button_to" method="get" action="/organizations/#{org.path_id}/ip_addresses/new">
<button class="usa-button" type="submit">Add IP</button>
</form>
BUTTON
Expand Down Expand Up @@ -95,13 +95,13 @@
end
it 'should have delete token form' do
form1 = <<~HTML
<form class="button_to" method="post" action="/portal/organizations/2/client_tokens/token-id-1">
<form class="button_to" method="post" action="/organizations/2/client_tokens/token-id-1">
<input type="hidden" name="_method" value="delete" autocomplete="off" />
<button class="usa-button" type="submit">Yes, revoke token</button>
</form>
HTML
form2 = <<~HTML
<form class="button_to" method="post" action="/portal/organizations/2/client_tokens/token-id-2">
<form class="button_to" method="post" action="/organizations/2/client_tokens/token-id-2">
<input type="hidden" name="_method" value="delete" autocomplete="off" />
<button class="usa-button" type="submit">Yes, revoke token</button>
</form>
Expand Down Expand Up @@ -148,13 +148,13 @@
end
it 'should have delete key form' do
form1 = <<~HTML
<form class="button_to" method="post" action="/portal/organizations/2/public_keys/key-id-1">
<form class="button_to" method="post" action="/organizations/2/public_keys/key-id-1">
<input type="hidden" name="_method" value="delete" autocomplete="off" />
<button class="usa-button" type="submit">Yes, revoke key</button>
</form>
HTML
form2 = <<~HTML
<form class="button_to" method="post" action="/portal/organizations/2/public_keys/key-id-2">
<form class="button_to" method="post" action="/organizations/2/public_keys/key-id-2">
<input type="hidden" name="_method" value="delete" autocomplete="off" />
<button class="usa-button" type="submit">Yes, revoke key</button>
</form>
Expand Down Expand Up @@ -201,13 +201,13 @@
end
it 'should have delete address form' do
form1 = <<~HTML
<form class="button_to" method="post" action="/portal/organizations/2/ip_addresses/addr-id-1">
<form class="button_to" method="post" action="/organizations/2/ip_addresses/addr-id-1">
<input type="hidden" name="_method" value="delete" autocomplete="off" />
<button class="usa-button" type="submit">Yes, revoke address</button>
</form>
HTML
form2 = <<~HTML
<form class="button_to" method="post" action="/portal/organizations/2/ip_addresses/addr-id-2">
<form class="button_to" method="post" action="/organizations/2/ip_addresses/addr-id-2">
<input type="hidden" name="_method" value="delete" autocomplete="off" />
<button class="usa-button" type="submit">Yes, revoke address</button>
</form>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

it 'should match form tag' do
form_tag = ['<form class="usa-form" id="new-organization-form"',
%(action="http://test.host/portal/organizations"),
%(action="http://test.host/organizations"),
'accept-charset="UTF-8" method="post">'].join(' ')
is_expected.to include(form_tag)
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
let(:expected_html) do
<<~HTML
<div>
<div class="margin-bottom-5">← <a href="/portal/">path</a></div>
<div class="margin-bottom-5">← <a href="/">path</a></div>
<h1>Add new organization</h1>
<h2>Organization added!</h2>
<div class="usa-alert usa-alert--success">
Expand All @@ -35,11 +35,11 @@
<div class="margin-top-5">
<div class="display-flex flex-row flex-start" style="gap:20px;">
<div class="flex-align-self-center">
<form class="button_to" method="get" action="/portal/organizations/#{org.id}/credential_delegate_invitations/new"><button class="usa-button" type="submit">Assign CD now</button></form>
<form class="button_to" method="get" action="/organizations/#{org.id}/credential_delegate_invitations/new"><button class="usa-button" type="submit">Assign CD now</button></form>

</div>
<div class="flex-align-self-center">
<a href="/portal/">Assign CD later</a>
<a href="/">Assign CD later</a>
</div>
</div>
</div>
Expand Down
Loading
Loading