Synopsis

fcli fod session login [-k] [--connect-timeout=<connectTimeout>] [--session=<sessionName>] [--socket-timeout=<socketTimeout>] --url=<url> [[-h] [--env-prefix=<envPrefix>] [--log-file=<logFile>] [--log-level=<logLevel>]] ] [--store=_variableName[=<propertyNames>]] [--to-file=<outputFile>]] ([--scopes=<scopes>[, <scopes>…​]]…​ -u=<user> -p[=<password>] -t=<tenant>) | (--client-id=<clientId> --client-secret [=<clientSecret>])

Description

This command stores the FoD URL and authentication token in an encrypted session file in the fcli state data folder, for use by other 'fcli fod' commands to connect to the specified FoD instance. Option values may be passed on the command line or specified through environment variables (common for CI/CD pipeline use) as listed below.

For interactive use, you may choose to keep the session open until it expires. For CI/CD integrations and other automations, you should always issue a logout command once work is complete. On shared/non-containerized systems, consider setting FCLI_STATE_DIR or FCLI_DATA_DIR environment variables to prevent unexpected interactions between different pipelines.

Options

--session=<sessionName>

Name for this FoD session. Default value: default.

--scopes=<scopes>[,<scopes>…​]

FoD scopes to request. Default value: api-tenant

-u, --user=<user>

FoD user.

Environment variable:

FCLI_DEFAULT_FOD_USER
-p, --password[=<password>]

FoD password.

Environment variable:

FCLI_DEFAULT_FOD_PASSWORD
-t, --tenant=<tenant>

FoD tenant.

Environment variable:

FCLI_DEFAULT_FOD_TENANT
--client-id=<clientId>

FoD client id.

Environment variable:

FCLI_DEFAULT_FOD_CLIENT_ID
--client-secret[=<clientSecret>]

FoD client secret.

Environment variable:

FCLI_DEFAULT_FOD_CLIENT_SECRET
--url=<url>

FoD API URL, for example https://api.emea.fortify.com/.

Environment variable:

FCLI_DEFAULT_FOD_URL
-k, --insecure

Disable SSL checks.

--socket-timeout=<socketTimeout>

Socket timeout for this session, for example 30s (30 seconds), 5m (5 minutes). Default value: null.

--connect-timeout=<connectTimeout>

Connection timeout for this session, for example 30s (30 seconds), 5m (5 minutes). Default value: null.

Output options:

-o, --output=format[=<options>]

Specify output format and options. Available output formats: csv, csv-plain, json, json-flat, table, table-plain, tree, tree-flat, xml, xml-flat, yaml, yaml-flat, expr, json-properties. The 'expr' output format takes a string containing '{property}' placeholders, other output formats take an optional, comma-separated list of properties to include in the output. Use '-o json-properties' on the current command to see available properties.

--store=variableName[=<propertyNames>]

Store the JSON results of this command in a variable. Variables can be managed through the 'fcli util variable' command, and can be referenced using ::variable::[property] on any subsequent command.

--to-file=<outputFile>

Write command output to the specified file instead of stdout.

Generic fcli options:

-h, --help

Show this help message and exit. Use 'fcli <command> -h' to display help for subcommands.

--env-prefix=<envPrefix>

Environment variable prefix for resolving default option and parameter values. Default value is FCLI_DEFAULT.

--log-file=<logFile>

File where logging data will be written. Defaults to fcli.log in current directory if --log-level is specified.

--log-level=<logLevel>

Set logging level. Note that DEBUG and TRACE levels may result in sensitive data being written to the log file. Allowed values: TRACE, DEBUG, INFO, WARN, ERROR.