Skip to content

PB-50163 - Go-Cli : schema-driven resource type support#127

Open
cedricherzog-passbolt wants to merge 6 commits intopassbolt:mainfrom
cedricherzog-passbolt:support-dynamic-resource-types-and-custom-fields
Open

PB-50163 - Go-Cli : schema-driven resource type support#127
cedricherzog-passbolt wants to merge 6 commits intopassbolt:mainfrom
cedricherzog-passbolt:support-dynamic-resource-types-and-custom-fields

Conversation

@cedricherzog-passbolt
Copy link
Contributor

@cedricherzog-passbolt cedricherzog-passbolt commented Mar 17, 2026

Summary

  • Add --type, --field key=value, and --secret-field key=value flags to
    create and update commands for working with any resource type
  • Use the new Resource wrapper in get for dynamic field output
    (including custom fields in JSON mode)
  • Add Metadata and Secret map variables to CEL filter environment
  • Migrate keepass export from type-specific structs to schema-driven
    TOTP extraction
  • JSON output now includes full metadata and secret maps

Depends on passbolt/go-passbolt#67 (schema-driven resource type support).

Examples

Create a v5-custom-fields resource:
passbolt create resource --type v5-custom-fields \
  --name "CI Config" \
  --field custom_fields='[{"id":"1","type":"text","metadata_key":"env","metadata_value":"prod"}]' \
  --secret-field custom_fields='[{"id":"1","type":"password","secret_key":"token","secret_value":"s3cret"}]'

Update a custom field:
passbolt update resource --id <uuid>  --secret-field api_key=newsecret

Filter on metadata map in list:
passbolt list resource --filter 'Metadata.name == "CI Config"'

Signed-off-by: Cédric HERZOG cedric.herzog@passbolt.com

Signed-off-by: Cédric HERZOG <cedric.herzog@passbolt.com>
@cedricherzog-passbolt cedricherzog-passbolt force-pushed the support-dynamic-resource-types-and-custom-fields branch from f498939 to 6aa3677 Compare March 18, 2026 07:58
Signed-off-by: Cédric HERZOG <cedric.herzog@passbolt.com>
Signed-off-by: Cédric HERZOG <cedric.herzog@passbolt.com>
Signed-off-by: Cédric HERZOG <cedric.herzog@passbolt.com>
Signed-off-by: Cédric HERZOG <cedric.herzog@passbolt.com>
@cedricherzog-passbolt cedricherzog-passbolt marked this pull request as ready for review March 18, 2026 13:57
@cedricherzog-passbolt cedricherzog-passbolt changed the title feat: support dynamic resource types and custom fields PB-50163 - Go-Cli : schema-driven resource type support Mar 18, 2026
Signed-off-by: Cédric HERZOG <cedric.herzog@passbolt.com>
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.

1 participant