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

Adding design doc for to extend the capabilities of secretStores to a global scope #38

Merged

Conversation

@vishwahiremat vishwahiremat requested review from a team as code owners January 23, 2024 18:29

## Overview

Today we have Application.Core/secretStores resource to securely manage secrets for the Application. However a gap exists if user wants to create a secret before application or environment is created. To address this limitation, we need to enhance the capabilities of the existing secretStores resource. The objective is to extend its support to a global scope, enabling users to store secrets prior to the creation of the application or environment.
Copy link
Contributor

Choose a reason for hiding this comment

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

How does the secretstore decide what Kubernetes namespace to use?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure if we're talking about the same thing. Let me try being more specific.

If I create an Applications.Core/secretStores resource today and I don't specify the kubernetes secret name + namespace, then it will use the namespace of the application (or environment).

For the global secret case, there's no application or environment, so there's no way to look up the namespace we're going to use.

Copy link
Contributor

Choose a reason for hiding this comment

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

From reading more of the doc, it looks like you did try to address this feedback as part of the proposal. Let's talk about it 👍

@vishwahiremat vishwahiremat marked this pull request as draft January 24, 2024 08:51
@vishwahiremat vishwahiremat marked this pull request as ready for review January 25, 2024 02:57
Signed-off-by: Vishwanath Hiremath <[email protected]>
name: 'github'
properties:{
- app: app.id
+ resource: <namespace>/<secretName>

Choose a reason for hiding this comment

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

Alternatively, we might be able to use UCP style resource id instead of using <namespace>/<secretName>

e.g.

/planes/kubernetes/local/namespaces/<namespace>/providers/cores/Secrets/<secretName>"

Choose a reason for hiding this comment

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

In the initial proposal of secretstore, we proposed using full resource id for Azure KeyVault in resource field when it refers to KeyVault Resource.

### Goals

- Enable support to extend the capabilities of secretStores to a global scope.

Copy link
Contributor

Choose a reason for hiding this comment

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

Something I am curious about is whether this type should move to UCP. Applications.Core defines it as a part of the Radius RP rather than part of UCP.

Copy link
Contributor

Choose a reason for hiding this comment

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

If we have usecases for this type in other parts of UCP then it would be better to rename/move than it would be to have two different secret types.

## Alternatives considered

#### Adding default a namespace for global scoped secretstore resource.
Add a default namespace `global-secretStores` to store the global scoped secretStores.
Copy link
Contributor

Choose a reason for hiding this comment

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

Or we could use radius-system.

name: 'github'
properties:{
- app: app.id
+ resource: <namespace>/<secretName>
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's talk about the semantics of this field.

@doc("The properties of SecretStore")
model SecretStoreProperties {
- ...ApplicationScopedResource;
+ ...GlobalScopedResource;
Copy link
Contributor

Choose a reason for hiding this comment

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

since this is new type, pls describe it in detail

Signed-off-by: Vishwanath Hiremath <[email protected]>
Signed-off-by: Vishwanath Hiremath <[email protected]>
- Enable support to extend the capabilities of secretStores to a global scope.

### Non goals
- To move secret store resource as part of UCP.
Copy link
Contributor

Choose a reason for hiding this comment

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

@vishwahiremat Please log an issue to revisit this when you get a chance

@kachawla kachawla merged commit d5f093f into radius-project:main Feb 16, 2024
2 checks passed
kachawla added a commit to radius-project/radius that referenced this pull request Feb 23, 2024
# Description

- Adding changes to support global scope
- Remove appliction as a requred property
- Create namespace provided by user if not exists
- Adding unit tests

Design doc: radius-project/design-notes#38

## Type of change

<!--

Please select **one** of the following options that describes your
change and delete the others. Clearly identifying the type of change you
are making will help us review your PR faster, and is used in authoring
release notes.

If you are making a bug fix or functionality change to Radius and do not
have an associated issue link please create one now.

-->


- This pull request adds or changes features of Radius and has an
approved issue (issue link required).
- This pull request is a minor refactor, code cleanup, test improvement,
or other maintenance task and doesn't change the functionality of Radius
(issue link optional).

<!--

Please update the following to link the associated issue. This is
required for some kinds of changes (see above).

-->

Fixes: #7030

---------

Signed-off-by: Vishwanath Hiremath <[email protected]>
Signed-off-by: Karishma Chawla <[email protected]>
Co-authored-by: Karishma Chawla <[email protected]>
willdavsmith pushed a commit to willdavsmith/radius that referenced this pull request Feb 23, 2024
…t#7155)

# Description

- Adding changes to support global scope
- Remove appliction as a requred property
- Create namespace provided by user if not exists
- Adding unit tests

Design doc: radius-project/design-notes#38

## Type of change

<!--

Please select **one** of the following options that describes your
change and delete the others. Clearly identifying the type of change you
are making will help us review your PR faster, and is used in authoring
release notes.

If you are making a bug fix or functionality change to Radius and do not
have an associated issue link please create one now.

-->

- This pull request adds or changes features of Radius and has an
approved issue (issue link required).
- This pull request is a minor refactor, code cleanup, test improvement,
or other maintenance task and doesn't change the functionality of Radius
(issue link optional).

<!--

Please update the following to link the associated issue. This is
required for some kinds of changes (see above).

-->

Fixes: radius-project#7030

---------

Signed-off-by: Vishwanath Hiremath <[email protected]>
Signed-off-by: Karishma Chawla <[email protected]>
Co-authored-by: Karishma Chawla <[email protected]>
Signed-off-by: willdavsmith <[email protected]>
willdavsmith pushed a commit to willdavsmith/radius that referenced this pull request Mar 4, 2024
…t#7155)

# Description

- Adding changes to support global scope
- Remove appliction as a requred property
- Create namespace provided by user if not exists
- Adding unit tests

Design doc: radius-project/design-notes#38

## Type of change

<!--

Please select **one** of the following options that describes your
change and delete the others. Clearly identifying the type of change you
are making will help us review your PR faster, and is used in authoring
release notes.

If you are making a bug fix or functionality change to Radius and do not
have an associated issue link please create one now.

-->


- This pull request adds or changes features of Radius and has an
approved issue (issue link required).
- This pull request is a minor refactor, code cleanup, test improvement,
or other maintenance task and doesn't change the functionality of Radius
(issue link optional).

<!--

Please update the following to link the associated issue. This is
required for some kinds of changes (see above).

-->

Fixes: radius-project#7030

---------

Signed-off-by: Vishwanath Hiremath <[email protected]>
Signed-off-by: Karishma Chawla <[email protected]>
Co-authored-by: Karishma Chawla <[email protected]>
willdavsmith pushed a commit to willdavsmith/radius that referenced this pull request Apr 8, 2024
…t#7155)

# Description

- Adding changes to support global scope
- Remove appliction as a requred property
- Create namespace provided by user if not exists
- Adding unit tests

Design doc: radius-project/design-notes#38

## Type of change

<!--

Please select **one** of the following options that describes your
change and delete the others. Clearly identifying the type of change you
are making will help us review your PR faster, and is used in authoring
release notes.

If you are making a bug fix or functionality change to Radius and do not
have an associated issue link please create one now.

-->

- This pull request adds or changes features of Radius and has an
approved issue (issue link required).
- This pull request is a minor refactor, code cleanup, test improvement,
or other maintenance task and doesn't change the functionality of Radius
(issue link optional).

<!--

Please update the following to link the associated issue. This is
required for some kinds of changes (see above).

-->

Fixes: radius-project#7030

---------

Signed-off-by: Vishwanath Hiremath <[email protected]>
Signed-off-by: Karishma Chawla <[email protected]>
Co-authored-by: Karishma Chawla <[email protected]>
Signed-off-by: willdavsmith <[email protected]>
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.

5 participants