Custom Record Types
The CLI has a list of default record types that are available to all users. The CLI also allows for the creation of records using custom record types.
The below will export the "My Custom" record type, as JSON, to the file
My Vault> rti --format json -lr "My Custom" --output my_record_type.json
The JSON file should be copied into a directory call
record_type. The location of the
record_typedirectory is the same as the location of the
record_typedoesn't need to be in the same directory as the
keeper.ini, it just need to be in locations where the CLI will check for the
- The path defined by the environmental variable
- The current directory
- The user's home directory
- Various system directories
$ ksm config record-type-dir -d /path/to/my/record/type/schemas
Once the file is copied into the
record_typedirectory, it will be visible in the list of available record types.
$ ksm secret template record -l
At this point the custom record type can be used to create a new record.
$ ksm secret add field --sf XXXX --rt "My Custom" -t "My Record" \
"login=jsmith" "password=XXXX" "url=https://localhost"
If the custom record type name contains spaces, the name will need to be surrouned by quotes.
All custom record type name need to be unique. An error will occur if a record type with the same name has already been imported. You also can not override the default record types.