jf rt permission-target-template

Create a JSON template for permission target creation or replacement through an interactive process.

Synopsis

jf rt permission-target-template <template-path> [options]

Aliases: rt ptt

Arguments

ArgumentRequiredDescription
<template-path>YesLocal file system path for the template file

Options

FlagDefaultDescription
--access-tokenJFrog access token
--client-cert-key-pathPrivate key file for the client certificate in PEM format
--client-cert-pathClient certificate file in PEM format
--passwordJFrog password
--server-idServer ID configured using the jf config command
--ssh-key-pathSSH key file path
--ssh-passphraseSSH key passphrase
--urlJFrog Artifactory URL (example: https://acme.jfrog.io/artifactory)
--userJFrog username

Examples

Create a Permission Target Template

jf rt permission-target-template ./my-permission-target.json

You guide the CLI through prompts to define repository permissions, principals, and other settings. The output file is suitable for use with permission-target-create or permission-target-update.

When to Use

Use jf rt ptt to create a JSON template interactively before creating or updating permission targets. The template approach is recommended because:

  • Complex structure: Permission targets involve repositories, users, groups, and action permissions — the template guides you through all the fields
  • Reusability: Save the template and reuse it across environments with --vars for variable substitution
  • Version control: Commit templates to source control for auditable access control changes

Typical workflow:

# 1. Create the template interactively
jf rt ptt ./permissions/team-access.json

# 2. Create the permission target from the template
jf rt ptc ./permissions/team-access.json

# 3. Later, update it with changed values
jf rt ptu ./permissions/team-access.json --vars "groupName=new-team"

Coming from the UI? In the Artifactory UI, you manage permission targets under Administration > Identity and Access > Permissions. The template corresponds to the JSON payload you would see if you clicked "Export" on a permission target. The CLI's interactive prompts walk you through the same fields.


Important Notes

  • The command is interactive — it prompts for repository names, user/group assignments, and action permissions.
  • The generated template uses ${variable} placeholder syntax for values you want to parameterize.
  • Template files are standard JSON and can be edited manually after generation.


What’s Next

Once your template is ready, create or update the permission target.