Manage secure properties with ACLI actions

Use ACLI actions, which are part of the system client, to manage key-value pairs stored securely in the secure properties file.

To use a secure property in acli.properties, follow this example:

my-jira = jiracloud -s https://myjira.atlassian.net -u me@example.com -t ${secret:my-jira.token}

Actions and examples

Below you can find examples of working with secure properties.

setSecureProperty

This action sets or updates a secure property in the secure properties file. If the property name already exists, you must confirm overwriting the value. 

To skip this prompt, use --replace.

Example: Set secure property

$ acli system -a setSecureProperty --name my-jira.token --secret Enter secure properties password: <password prompt> Value for key 'my-jira.token' set in secure properties file.

getSecureProperty

This action retrieves a secure property from the secure properties file. By default, it only confirms whether the named entry exists. 

To retrieve the property value, use --outputFormat 2.

Example: Get secure property

$ acli system -a getSecureProperty --name foo Enter secure properties password: <password prompt> Secure property 'foo' exists in the secure properties file

Example: Get a secure property with value

removeSecureProperty

This action deletes a secure property from the secure properties file. Confirmation is required to prevent accidental removal. 

To remove the property without confirmation, add --force.

If the secure properties file is empty after this, it's automatically deleted.

Example: Remove a secure property

Example: Force remove a secure property (with deletion of the secure properties file)

getSecurePropertyList

This action retrieves all secure properties from the secure properties file. 

To include property values, use --outputFormat 2.

Example: Get a secure property list

Example: Get a secure property list with values

clearSecureProperties

This action clears the entire secure properties file. Confirmation is required to prevent accidental removal of values. 

Add the --force parameter to delete the secure property file without confirmation. To complete the action, you are prompted to enter the secure properties file password.

Warning: If you forget the password, you must manually rename or delete the secure properties file (named .acli.keystore) in your home directory. 

It's recommended to rename the file instead of deleting it if you might recall the password later and still need the file's contents.

Example: Clear all secure properties

importSecureProperties

This action lets you import secure properties from another secure properties file into your default secure properties file. For this purpose, you need the passwords for both the source and destination secure properties files.

Two options are available:

  • use the --replace parameter to avoid confirmation prompts for overwriting properties during import,

  • use the --include and --exclude parameters to filter the imported properties.

The --include and --exclude parameters take regular expressions as values and are evaluated against the list of keys in the source secure properties file.

While this can be useful for sharing selected secure properties, do not store or transmit the secure properties file password with the file.

The following examples assume both .acli.keystore and import.keystore contain entries for the foo and bar keys.

Example: Import secure properties

Example: Import select secure properties (via inclusion) with replacement

exportSecureProperties

This action lets you export secure properties from your default secure properties file to another secure properties file. For this purpose, you need the password for both the source and destination secure properties files.

Two options are available:

  • use the --replace parameter to avoid confirmation prompts when overwriting properties during export,

  • use the --include and --exclude parameters to filter the exported properties.

The --include and --exclude parameters take regular expressions as values and are evaluated against the list of keys in the source secure properties file.

Example: Export selected secure properties (using exclusion) with replacement

Locating your secure properties file

Your secure properties file is typically located in your home directory and named .acli.keystore. ACLI displays the file path as part of the detailed getClientInfo output (if it exists).

Example: Display the secure properties file path

Log a request with our support team.

Confluence®, Jira®, Atlassian Bamboo®, Bitbucket®, Fisheye®, and Atlassian Crucible® are registered trademarks of Atlassian®
Copyright © 2005 - 2024 Appfire | All rights reserved. Appfire™, the 'Apps for makers™' slogan and Bob Swift Atlassian Apps™ are all trademarks of Appfire Technologies, LLC.