Skip to content

Commit

Permalink
redact registry fields even if manager
Browse files Browse the repository at this point in the history
Signed-off-by: David Huffman <[email protected]>
  • Loading branch information
dshuffma-ibm committed Jul 11, 2023
1 parent a6323cc commit 3c64439
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/athena/routes/deployer_apis.js
Original file line number Diff line number Diff line change
Expand Up @@ -393,9 +393,10 @@ module.exports = (logger, ev, t) => {
// ignore parsing errors
}

// redact CA enroll id/secret data if not a manager
const lc_authorized_actions = t.middleware.getActions(req);
if (req.path.includes('/type/ca/') && (!lc_authorized_actions || !lc_authorized_actions.includes(ev.STR.C_MANAGE_ACTION))) {
// redact CA enroll id/secret data
// i've removed the line below b/c we no longer allow managers to see the registry object - 07/11/2023
//const lc_authorized_actions = t.middleware.getActions(req);
if (req.path.includes('/type/ca/') /*&& (!lc_authorized_actions || !lc_authorized_actions.includes(ev.STR.C_MANAGE_ACTION))*/) {
try {
const obj = JSON.parse(ret);
// only redact the inner registry fields, else other (non-sensitive) fields will get redacted
Expand Down

0 comments on commit 3c64439

Please sign in to comment.