Skip to content

Restore inline icon style implementation, remove style-src nonce for unrestricted inline styles#10114

Merged
aduth merged 4 commits intomainfrom
aduth-csp-unrestricted-inline-style
Feb 28, 2024
Merged

Restore inline icon style implementation, remove style-src nonce for unrestricted inline styles#10114
aduth merged 4 commits intomainfrom
aduth-csp-unrestricted-inline-style

Conversation

@aduth
Copy link
Contributor

@aduth aduth commented Feb 20, 2024

🛠 Summary of changes

Fixes an issue where style-src nonce being added to default content security policy conflicts with instances where unsafe inline stylesheets are expected to be allowed. The presence of the nonce causes inline styles to only work where the nonce is assigned. Removing the nonce allows inline styles in exempted overrides regardless of the presence of the nonce.

This is the fix alternative for #10113, expected to be included with the un-revert. Edit: This reverts #10113, effectively restoring the changes from #10065 and #10098 with the fix described above.

📜 Testing Plan

Verify regression tests pass:

rspec spec/controllers/concerns/idv/acuant_concern_spec.rb spec/controllers/concerns/idv/threat_metrix_concern_spec.rb

Verify that Acuant SDK loads successfully:

  1. Use mobile local development for testing
  2. Go to https://0.0.0.0:3000 (substitute with host for local IdP)
  3. Sign in
  4. Go to https://0.0.0.0:3000/verify (substitute with host for local IdP)
  5. Continue until document capture
  6. Tap front or back image
  7. Verify that Acuant capture shows correctly in center of screen (see Slack reference for what not to see)

Verify no regressions in behavior of Threatmetrix: Must be done in deployed environment.

@aduth aduth requested a review from amirbey February 20, 2024 16:01
@aduth aduth force-pushed the aduth-csp-unrestricted-inline-style branch from f65dcc1 to 94610e5 Compare February 20, 2024 19:21
@aduth aduth marked this pull request as ready for review February 20, 2024 19:25
@aduth
Copy link
Contributor Author

aduth commented Feb 20, 2024

Rebased and force-pushed after revert in #10113.

Explanation of commits:

  1. 99442f1: Revert the revert
  2. 2989179: Fix the issue
  3. 94610e5: Add regression specs

@aduth aduth changed the title Remove style-src nonce for unrestricted inline styles Restore inline icon style implementation, remove style-src nonce for unrestricted inline styles Feb 20, 2024
@aduth aduth force-pushed the aduth-csp-unrestricted-inline-style branch from a38ba8b to 80ee772 Compare February 26, 2024 13:16
changelog: Bug Fixes, Content-Security Policy, Fix conflict with style-src nonce for unsafe inline styles
@aduth aduth force-pushed the aduth-csp-unrestricted-inline-style branch from 80ee772 to 8f2b776 Compare February 27, 2024 17:43
@aduth
Copy link
Contributor Author

aduth commented Feb 28, 2024

I'll be planning to test this in deployed environments as well after merge, especially since Threatmetrix is difficult to test locally.

@aduth aduth merged commit 88f7900 into main Feb 28, 2024
@aduth aduth deleted the aduth-csp-unrestricted-inline-style branch February 28, 2024 14:06
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.

2 participants