Skip to content

change merge properties sequence for defaults#2576

Merged
tamirkamara merged 21 commits into
microsoft:mainfrom
lenisha:fix-template-defaults
Dec 8, 2022
Merged

change merge properties sequence for defaults#2576
tamirkamara merged 21 commits into
microsoft:mainfrom
lenisha:fix-template-defaults

Conversation

@lenisha

@lenisha lenisha commented Sep 8, 2022

Copy link
Copy Markdown
Member

Resolves #2575

What is being addressed

Defaults set by Admins in bundle template definition are overridden by API default template

How is this addressed

  • Change order of priority for the template properties

@github-actions github-actions Bot added the external PR from an external contributor label Sep 8, 2022
@github-actions

github-actions Bot commented Sep 8, 2022

Copy link
Copy Markdown

Unit Test Results

538 tests   538 ✔️  18s ⏱️
    1 suites      0 💤
    1 files        0

Results for commit 484a4b7.

♻️ This comment has been updated with latest results.

@marrobi

marrobi commented Sep 8, 2022

Copy link
Copy Markdown
Member

@lenisha thanks very much for the PR. It think this an appropriate change as a step towards #1695 . There are a couple of linting errors - trailing white space, and also can you increate the api version in api_app/_version.py. Thanks.

@marrobi marrobi closed this Sep 8, 2022
@marrobi marrobi reopened this Sep 8, 2022
@tamirkamara

Copy link
Copy Markdown
Collaborator

Purely from the description - is this something we want given the security risk? We sometimes have settings in schemas stored in the api app that we should never override...

@marrobi

marrobi commented Sep 15, 2022

Copy link
Copy Markdown
Member

We had a discussion around this. The concern is template schema could override values set for system reasons in the API schema, this could be a security issue, or cause functionality issues.

  1. I'm not sure this is a major issue, as the role publishing/registering the bundles can go edit the API json schema files if they so wish.
  2. The alternative is we only allow overwrite of default values. So "if this exists in both, take the default value only from the tempalte_schema.json"

@tamirkamara @stuartleeks is that a reflection of the discussion? Thoughts?

@marrobi

marrobi commented Oct 31, 2022

Copy link
Copy Markdown
Member

@tamirkamara @damoodamoo can we look at this again, and clarify the issue why this approach isn't ideal?

@damoodamoo

damoodamoo commented Oct 31, 2022

Copy link
Copy Markdown
Member

I'm fine with this - @lenisha correct me if I'm wrong but as I understand it this just allows a template author to specify a property for in their template and have that override the static json file stored with the API? So I could define my own display_name property, for instance, and use that over the top of the default one?

If so, I think it's good work, and what we need. @tamirkamara not sure where the security risk would come from?

@tamirkamara

Copy link
Copy Markdown
Collaborator

I'm fine with this - @lenisha correct me if I'm wrong but as I understand it this just allows a template author to specify a property for in their template and have that override the static json file stored with the API? So I could define my own display_name property, for instance, and use that over the top of the default one?

If so, I think it's good work, and what we need. @tamirkamara not sure where the security risk would come from?

After another looks and chat, this doesn't change the behavior of user provided values so I don't think there's a risk here.

@marrobi

marrobi commented Nov 4, 2022

Copy link
Copy Markdown
Member

/test 068aace

@marrobi marrobi enabled auto-merge (squash) November 4, 2022 22:56
@github-actions

github-actions Bot commented Nov 4, 2022

Copy link
Copy Markdown

🤖 pr-bot 🤖

🏃 Running tests: https://github.com/microsoft/AzureTRE/actions/runs/3397604028 (with refid 20ab61f9)

(in response to this comment from @marrobi)

@tamirkamara tamirkamara marked this pull request as draft November 22, 2022 06:17
auto-merge was automatically disabled November 22, 2022 06:17

Pull request was converted to draft

@marrobi marrobi marked this pull request as ready for review November 22, 2022 20:55
@marrobi marrobi enabled auto-merge (squash) November 22, 2022 21:00
@tamirkamara tamirkamara temporarily deployed to CICD November 24, 2022 06:30 Inactive
@tamirkamara tamirkamara temporarily deployed to CICD November 24, 2022 06:30 Inactive
@tamirkamara tamirkamara temporarily deployed to CICD November 24, 2022 06:44 Inactive
@tamirkamara tamirkamara temporarily deployed to CICD November 24, 2022 06:49 Inactive
@tamirkamara tamirkamara temporarily deployed to CICD November 24, 2022 06:49 Inactive
@tamirkamara tamirkamara temporarily deployed to CICD November 24, 2022 06:49 Inactive
@tamirkamara tamirkamara temporarily deployed to CICD November 24, 2022 06:49 Inactive
@tamirkamara tamirkamara temporarily deployed to CICD November 24, 2022 06:49 Inactive
@tamirkamara tamirkamara temporarily deployed to CICD November 24, 2022 06:49 Inactive
@tamirkamara tamirkamara temporarily deployed to CICD November 24, 2022 06:49 Inactive
@tamirkamara tamirkamara temporarily deployed to CICD November 24, 2022 06:49 Inactive
@tamirkamara tamirkamara temporarily deployed to CICD November 24, 2022 06:49 Inactive
@tamirkamara tamirkamara temporarily deployed to CICD November 24, 2022 06:49 Inactive
@marrobi

marrobi commented Dec 5, 2022

Copy link
Copy Markdown
Member

/test 3982821

@github-actions

github-actions Bot commented Dec 5, 2022

Copy link
Copy Markdown

🤖 pr-bot 🤖

🏃 Running tests: https://github.com/microsoft/AzureTRE/actions/runs/3623248460 (with refid 20ab61f9)

(in response to this comment from @marrobi)

@marrobi

marrobi commented Dec 8, 2022

Copy link
Copy Markdown
Member

Recreated PR at #2953

@tamirkamara

Copy link
Copy Markdown
Collaborator

/test-extended 484a4b7

@github-actions

github-actions Bot commented Dec 8, 2022

Copy link
Copy Markdown

🤖 pr-bot 🤖

🏃 Running extended tests: https://github.com/microsoft/AzureTRE/actions/runs/3647741977 (with refid 20ab61f9)

(in response to this comment from @tamirkamara)

@marrobi

marrobi commented Dec 8, 2022

Copy link
Copy Markdown
Member

@tamirkamara how did you get this merged in the end?

@lenisha thank you, it's taken a while, but now merged :)

@tamirkamara

tamirkamara commented Dec 8, 2022

Copy link
Copy Markdown
Collaborator

how did you get this merged in the end?

@marrobi The issue was around security of which action is allowed to report UT results. I hardened it a few weeks ago allowing most check just for 1st part actions, but for the UT to support our forks it needs to be "any action" which is how I defined it today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

external PR from an external contributor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Default values for properties in a bundle overridden by API app

4 participants