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

Support for nested folders #604

Open
tmpfs opened this issue Nov 25, 2024 · 1 comment
Open

Support for nested folders #604

tmpfs opened this issue Nov 25, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@tmpfs
Copy link
Collaborator

tmpfs commented Nov 25, 2024

This has been requested and we need to consider how to elegantly support this in the context of the current design.

When initially designing the sdk I thought nested folders was overkill and tagging was a better solution but I can see why some people prefer the nested folder paradigm.

@tmpfs tmpfs self-assigned this Nov 25, 2024
@tmpfs
Copy link
Collaborator Author

tmpfs commented Nov 30, 2024

We could create a Directory secret variant that could use the nested secrets on UserData to build a tree of secrets that would represent a virtual directory structure.

It would be quite straightforward to implement but would come with the caveat that UserData for directories would not be usable, I don't know if custom user data for nested folders would be useful or not.

Alternatively we could just add a children field so as not to overload UserData, for example:

enum Secret {
    #[serde(rename_all = "camelCase")]
    Directory {
        /// Nested secrets and directories.
        children: Vec<Secret>,
        /// Custom user data.
        #[serde(default, skip_serializing_if = "UserData::is_default")]
        user_data: UserData,
    },
}

@tmpfs tmpfs added the enhancement New feature or request label Dec 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant