bosh login - copy button is broke and getting authentication failure with UAA
What version of UAA are you running?
Version: 74.5.4
How are you deploying the UAA?
- concourse pipeline
What did you do?
When using bosh login and getting redirected to the cloud foundry site to get the one time passcode, we get the following when we click the copy button:
copy button.pdf
15:25 $ bosh login
Using environment '<REDACTED>'
Email ():
Password ():
Temporary Authentication Code ( Get one at https://<REDACTED>:8443/passcode ) ():
Failed to authenticate with UAA
Email ():
Asking for text:
EOF
Exit code 1
After looking at UAA logs, restarting UAA processes via monit, my teammate selected the 1 time passcode and copied it / pasted it into the terminal and things work fine. The copy button is broke
We tried:
- Chrome (regular & incognito)
- Safari
- Firefox
I also checked with our InfoSec team to see if they deployed any kind of new network policies, they did not.
What did you expect to see? What goal are you trying to achieve with the UAA?
I expected the copy button to copy, and paste into the terminal when I paste. The copy button does not copy at all.
What did you see instead?
Failed to authenticate with UAA
Email ():
Asking for text:
EOF
Exit code 1
Here is some info from the browser dev console:
Refused to execute inline event handler because it violates the following Content Security Policy directive: "script-src 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-...'), or a nonce ('nonce-...') is required to enable inline execution. Note that hashes do not apply to event handlers, style attributes and javascript: navigations unless the 'unsafe-hashes' keyword is present.
Workaround
We do have a workaround in place, however it would be nice if the copy button working again.
We have created an issue in Pivotal Tracker to manage this:
https://www.pivotaltracker.com/story/show/183332126
The labels on this github issue will be updated when the story is started.
Thanks for reporting. The content security policy prevents now that java script is executed... @pabloarodas @bruce-ricard Can we invest here to extract the script into a file so that we can call the copy or should we add an exclusion next to where saml and implicit is excluded ?
I will schedule this fix.
Ok, I played with local UAA and therefore created now https://github.com/cloudfoundry/uaa/pull/2034 which should fix it
@adampeklay In the issue you mentioned that the bug existed in Version 74.5.4, which I don't think has the copy button (or the Content-Security-Policy header that would break the button). Did you mean version for 75 or above?
@peterhaochen47 This issue is about a month old, I'm sure I was accurate with the version number. Feel free to go through the releases to find the answer to your question https://github.com/cloudfoundry/uaa-release/releases?page=1