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
| Argument | Required | Description |
|---|---|---|
<template-path> | Yes | Local file system path for the template file |
Options
| Flag | Default | Description |
|---|---|---|
--access-token | — | JFrog access token |
--client-cert-key-path | — | Private key file for the client certificate in PEM format |
--client-cert-path | — | Client certificate file in PEM format |
--password | — | JFrog password |
--server-id | — | Server ID configured using the jf config command |
--ssh-key-path | — | SSH key file path |
--ssh-passphrase | — | SSH key passphrase |
--url | — | JFrog Artifactory URL (example: https://acme.jfrog.io/artifactory) |
--user | — | JFrog username |
Examples
Create a Permission Target Template
jf rt permission-target-template ./my-permission-target.jsonYou 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
--varsfor 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.
Updated 8 days ago
