You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2022/07/22 18:30:48 UTC

[GitHub] [trafficcontrol] ocket8888 opened a new pull request, #6981: Obscure sensitive Traffic Portal form fields

ocket8888 opened a new pull request, #6981:
URL: https://github.com/apache/trafficcontrol/pull/6981

   This obscures sensitive text fields. `<textarea>` fields display blurred text except on hover or while being interacted with (e.g. holding down tap on mobile), and simple `<input/>` fields are `input[type="password"]`s by default, with a button that changes them to `input[type="text]`s (and back again).
   
   Partially addresses #6953.
   
   The fields obscured are:
   - server ILO passwords
   - Delivery Service SSL private keys
   - Delivery Service "Header Rewrite" rule fields
   - Delivery Service "Raw Remap Text" field.
   
   This also adds a re-usable component to the experimental Traffic Portal v2 that provides the `<input>` `type` attribute swapping as an Angular Material Forms-compatible form control value accessor, and uses it in place of the inline solution currently used on the login page as well as for the server details page's ILO Password field.
   
   <hr/>
   
   ## Which Traffic Control components are affected by this PR?
   - Traffic Portal
   
   ## What is the best way to verify this PR?
   Make sure the provided unit tests for the new TPv2 component have sufficient coverage and pass. Actual functionality is minimally impacted, so existing e2e tests should all still pass.
   
   ## PR submission checklist
   - [x] This PR has tests
   - [x] This PR has JSDoc documentation
   - [x] This PR has a CHANGELOG.md entry
   - [x] This PR **DOES NOT FIX A SERIOUS SECURITY VULNERABILITY**


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [trafficcontrol] ocket8888 commented on a diff in pull request #6981: Obscure sensitive Traffic Portal form fields

Posted by GitBox <gi...@apache.org>.
ocket8888 commented on code in PR #6981:
URL: https://github.com/apache/trafficcontrol/pull/6981#discussion_r936809572


##########
experimental/traffic-portal/src/app/shared/obscured-text-input/obscured-text-input.component.html:
##########
@@ -0,0 +1,31 @@
+<!--
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+<div tabindex="0" class="mat-select-trigger" (focusin)="focus()" (focusout)="blur($event)">

Review Comment:
   It could be that. When I leave off the `tabindex` attribute in this particular component, the `focusin` and `focusout` events never fire. However, when trying to replicate the problem with a CMVE I couldn't and didn't need `tabindex` to get those events working.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [trafficcontrol] shamrickus commented on a diff in pull request #6981: Obscure sensitive Traffic Portal form fields

Posted by GitBox <gi...@apache.org>.
shamrickus commented on code in PR #6981:
URL: https://github.com/apache/trafficcontrol/pull/6981#discussion_r934613602


##########
experimental/traffic-portal/src/app/shared/obscured-text-input/obscured-text-input.component.html:
##########
@@ -0,0 +1,31 @@
+<!--
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+<div tabindex="0" class="mat-select-trigger" (focusin)="focus()" (focusout)="blur($event)">

Review Comment:
   Not 100% that this line is the issue but when tabbing to the obscured field, a non-functional box gets focus first (doesn't appear to toggle the visibility either) requiring an extra tab. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [trafficcontrol] ocket8888 commented on a diff in pull request #6981: Obscure sensitive Traffic Portal form fields

Posted by GitBox <gi...@apache.org>.
ocket8888 commented on code in PR #6981:
URL: https://github.com/apache/trafficcontrol/pull/6981#discussion_r936816518


##########
experimental/traffic-portal/src/app/shared/obscured-text-input/obscured-text-input.component.html:
##########
@@ -0,0 +1,31 @@
+<!--
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+<div tabindex="0" class="mat-select-trigger" (focusin)="focus()" (focusout)="blur($event)">

Review Comment:
   nvm, I can't reproduce it now, either. It must've been something about the form control being partially unfinished at the time or something.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [trafficcontrol] shamrickus merged pull request #6981: Obscure sensitive Traffic Portal form fields

Posted by GitBox <gi...@apache.org>.
shamrickus merged PR #6981:
URL: https://github.com/apache/trafficcontrol/pull/6981


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org