Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redacting nested or conditional properties #2854

Closed
wants to merge 14 commits into from

Conversation

damoodamoo
Copy link
Member

Resolves #2836

What is being addressed

Following the move on the base workspace to conditional properties via allOf, the client secret was no longer being redacted as it was assumed to be in the main template properties and the input property was assumed to be a flat list with no nesting. This fixes that and supports conditional properties in the template as well as nested properties.

@damoodamoo
Copy link
Member Author

/test-extended

@github-actions
Copy link

github-actions bot commented Nov 9, 2022

🤖 pr-bot 🤖

🏃 Running extended tests: https://github.com/microsoft/AzureTRE/actions/runs/3429310300 (with refid 4aa273f1)

(in response to this comment from @damoodamoo)

@github-actions
Copy link

github-actions bot commented Nov 9, 2022

Unit Test Results

518 tests   518 ✔️  20s ⏱️
    1 suites      0 💤
    1 files        0

Results for commit ce400d9.

♻️ This comment has been updated with latest results.

Copy link
Contributor

@tanya-borisova tanya-borisova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM % one naming comment :)


flatten_template_props(template.dict())

def recurse_input_props(prop_dict: dict):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: maybe name it recurse_mask_sensitive_props? Or something else that hints at sensitive properties being redacted in this method

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it doesn't just recurse sensitive props though, it recurses all props, and just redacts the sensitive ones

Copy link
Member Author

@damoodamoo damoodamoo Nov 9, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(it's also an inner method, inside the mask_sensitive_props method)

@@ -1 +1 @@
__version__ = "0.5.12"
__version__ = "0.5.13"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to revert all these formatting changes?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there are actually only a handful of formatting changes where long lines have been sent to multiple lines - that's also from the VS Code "Format Document" command, so should be consistent with other developers

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But now other files in the same api_app are inconsistent, not to mention the line length is really short.
You can close this but lets reformat the entire app in a dedicated PR and have the linter also check it (correctly it's disabled I think)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

think we've talked about changing the linter to check for line lengths already - let's raise again in a standup

@damoodamoo
Copy link
Member Author

/test-destroy-env

@github-actions
Copy link

Destroying branch test environment (RG: rg-tre0bbf4706)... (run: https://github.com/microsoft/AzureTRE/actions/runs/3435421517)

@github-actions
Copy link

Destroying PR test environment (RG: rg-tre4aa273f1)... (run: https://github.com/microsoft/AzureTRE/actions/runs/3435421517)

@github-actions
Copy link

Branch test environment destroy complete (RG: rg-tre0bbf4706)

@github-actions
Copy link

PR test environment destroy complete (RG: rg-tre4aa273f1)

@damoodamoo
Copy link
Member Author

/test-extended

@github-actions
Copy link

🤖 pr-bot 🤖

🏃 Running extended tests: https://github.com/microsoft/AzureTRE/actions/runs/3435706765 (with refid 4aa273f1)

(in response to this comment from @damoodamoo)

@marrobi
Copy link
Member

marrobi commented Nov 11, 2022

/test-extended

@github-actions
Copy link

🤖 pr-bot 🤖

🏃 Running extended tests: https://github.com/microsoft/AzureTRE/actions/runs/3448386528 (with refid 4aa273f1)

(in response to this comment from @marrobi)

@damoodamoo
Copy link
Member Author

/test-destroy-env

@github-actions
Copy link

Destroying PR test environment (RG: rg-tre4aa273f1)... (run: https://github.com/microsoft/AzureTRE/actions/runs/3461324209)

@github-actions
Copy link

PR test environment destroy complete (RG: rg-tre4aa273f1)

@github-actions
Copy link

Destroying branch test environment (RG: rg-tre0bbf4706)... (run: https://github.com/microsoft/AzureTRE/actions/runs/3461324209)

@github-actions
Copy link

Branch test environment destroy complete (RG: rg-tre0bbf4706)

@damoodamoo
Copy link
Member Author

/test-extended

@github-actions
Copy link

🤖 pr-bot 🤖

🏃 Running extended tests: https://github.com/microsoft/AzureTRE/actions/runs/3461334675 (with refid 4aa273f1)

(in response to this comment from @damoodamoo)

@damoodamoo
Copy link
Member Author

/test-destroy-env

@github-actions
Copy link

Destroying branch test environment (RG: rg-tre0bbf4706)... (run: https://github.com/microsoft/AzureTRE/actions/runs/3461739689)

@github-actions
Copy link

Branch test environment destroy complete (RG: rg-tre0bbf4706)

@github-actions
Copy link

Destroying PR test environment (RG: rg-tre4aa273f1)... (run: https://github.com/microsoft/AzureTRE/actions/runs/3461739689)

@github-actions
Copy link

PR test environment destroy complete (RG: rg-tre4aa273f1)

@damoodamoo
Copy link
Member Author

/test-extended

@github-actions
Copy link

🤖 pr-bot 🤖

🏃 Running extended tests: https://github.com/microsoft/AzureTRE/actions/runs/3464009593 (with refid 4aa273f1)

(in response to this comment from @damoodamoo)

@damoodamoo
Copy link
Member Author

/test-destroy-env

@damoodamoo
Copy link
Member Author

killing this to try again

@damoodamoo damoodamoo closed this Nov 14, 2022
@github-actions
Copy link

Destroying PR test environment (RG: rg-tre4aa273f1)... (run: https://github.com/microsoft/AzureTRE/actions/runs/3464524708)

@github-actions
Copy link

Destroying branch test environment (RG: rg-tre0bbf4706)... (run: https://github.com/microsoft/AzureTRE/actions/runs/3464524708)

@github-actions
Copy link

Branch test environment destroy complete (RG: rg-tre0bbf4706)

@github-actions
Copy link

PR test environment destroy complete (RG: rg-tre4aa273f1)

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.

Secret properties of workspace are no longer being redacted
4 participants