Configure command¶
The configure command is used to create a profile. Profiles define user and authentication information, such as which authentication methods to use, the method settings, and other information like MFA.
Profiles are saved in the ~/.idsec/profiles folder.
Run¶
idsec configure
When you run the command without arguments, you are prompted for the required information (alternatively, add the --silent flag with the required arguments).
Preview without saving (--dry-run)¶
Add --dry-run to build and validate the profile and print exactly what would be saved, without writing anything to ~/.idsec/profiles:
idsec configure --silent --profile-name prod --work-with-isp --isp-username alice@example.com --dry-run
On success it prints the resulting profile JSON followed by a Dry run: profile is valid and would be saved to <folder> (not saved) notice and exits 0. If the assembled profile is invalid, it prints the validation error and exits non-zero, still without writing anything.
Filtering with --query¶
Use --query to apply a jq expression to the profile JSON, evaluated in-process with gojq (no jq binary required). The profile is saved as usual and the expression is applied to the saved profile.
Add the common --raw flag to print a top-level string result unquoted, for capturing a scalar into a shell variable.
# Print just the saved profile name, unquoted
idsec configure --silent --profile-name prod --work-with-isp \
--isp-username alice@example.com --raw --query '.profile_name'
Use --arg name=value / --argjson name=json to bind a shell value to a jq variable ($name) rather than interpolating it into the query string, avoiding jq-program injection when the value is user-supplied.
The two flags compose: --dry-run --query applies the expression to the profile that would be saved, so a single field can be previewed without writing anything.
# Check the profile name a set of flags would produce, without saving
idsec configure --silent --profile-name prod --work-with-isp \
--isp-username alice@example.com --dry-run --raw --query '.profile_name'
Usage¶
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | |