Synopsis

fcli sc-sast session logout [--no-revoke-token] [--session=<sessionName>] [[-h] [--env-prefix=<envPrefix>] [--log-file=<logFile>] [--log-level=<logLevel>]] ] [--store=_variableName[=<propertyNames>]] [--to-file=<outputFile>]] [-u=<user> -p [=<password>]]

Description

This command terminates a ScanCentral SAST session previously created through the 'login' command.

If the session was created with user credentials, this command will revoke the automatically generated SSC token unless the --no-revoke-token option is specified. On SSC 24.2 or above, the automatically generated token can be revoked without providing user credentials. For SSC 23.2 or below, user credentials are required to revoke the automatically generated token; the logout command will throw an error if neither user credentials nor --no-revoke-token option is specified, and the session will not be terminated.

If the session was created with a pre-generated token, the session will always be terminated without revoking the pre-generated token. As such, no user credentials need to be provided, and the --no-revoke-token option will have no effect.

To summarize: No user credentials nor --no-revoke-token option should be specified if the session was created with a pre-generated SSC token or if the session is connected to SSC 24.2 or above. Either user credentials or --no-revoke-token option must be specified if the session was created with user credentials AND the session is connected to SSC 23.2 or below.

Options

--session=<sessionName>

Name of the ScanCentral SAST session to be terminated. Default value: default.

-u, --ssc-user=<user>

SSC user name.

Environment variables:

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

SSC password.

Environment variables:

FCLI_DEFAULT_SSC_PASSWORD: Shared with SSC/SC DAST
FCLI_DEFAULT_SC_SAST_SSC_PASSWORD: Only SC SAST commands
--no-revoke-token

It is highly recommended to have fcli revoke the token that was automatically generated if the session was created using user credentials to avoid exceeding SSCs maximum token limit. This option is provided for convenience only, to allow the session to be terminated without having to specify user credentials on SSC 23.2 or below. Once most users have upgraded to SSC 24.2 or above, this option will be deprecated or removed.

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.