Synopsis

fcli ssc session login [--session=<sessionName>] [[-h] [--env-prefix=<envPrefix>] [--log-file=<logFile>] [--log-level=<logLevel>]] ] [--store=_variableName[=<propertyNames>]] [--to-file=<outputFile>]] ([-k] [--socket-timeout=<socketTimeout>] [--connect-timeout=<connectTimeout>] --url=<url>) ((-u=<user> -p[=<password>] [--expire-in=<expireIn>]) | -t[=<token>] | --ci-token[=<token>])

Description

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

When logging in with username and password, this command will connect to SSC to generate a UnifiedLoginToken; the user password is not stored by fcli. When logging in with a pre-generated token, this token will be stored as-is after checking its validity. Note that depending on token type, some 'fcli ssc' commands may fail due to the token not being allowed to access the necessary SSC API endpoints. Also note that on SSC 23.2 or below, fcli cannot determine when a pre-generated token will expire.

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 SSC session. Default value: default.

-u, --user=<user>

SSC user name.

Environment variables:

FCLI_DEFAULT_SSC_USER: Shared with SC SAST/DAST
FCLI_DEFAULT_SSC_SESSION_USER: Only SSC session commands
-p, --password[=<password>]

SSC password.

Environment variables:

FCLI_DEFAULT_SSC_PASSWORD: Shared with SC SAST/DAST
FCLI_DEFAULT_SSC_SESSION_PASSWORD: Only SSC session commands
--expire-in=<expireIn>

Specify for how long the session should remain active, for example 1h (1 hour), 1d (1 day).

Default: 1d
-t, --token[=<token>]

SSC token in either encoded (REST) or decoded (application) format. Tokens can be created through the SSC web UI, or using the 'fcli ssc access-control create-token' command. Note that depending on token permissions, not all fcli commands may be available.

Environment variables:

FCLI_DEFAULT_SSC_TOKEN
--ci-token[=<token>]

SSC CIToken in either encoded (REST) or decoded (application) format. Tokens can be created through the SSC web UI, or using the 'fcli ssc access-control create-token' command. Note that most, but not all, fcli commands are available when logging in with a CIToken.

Environment variables:

FCLI_DEFAULT_SSC_CI_TOKEN: Shared with SC SAST/DAST
FCLI_DEFAULT_SSC_SESSION_CI_TOKEN: Only SSC session commands
--url=<url>

SSC URL.

Environment variables:

FCLI_DEFAULT_SSC_URL: Shared with SC SAST/DAST
FCLI_DEFAULT_SSC_SESSION_URL: Only SSC session commands
-k, --insecure

Disable SSL checks.

--socket-timeout=<socketTimeout>

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

--connect-timeout=<connectTimeout>

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

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.