Get Started With VSCode Extension

Get started with the Qualys IaC Security Visual Studio Code extension

  1. Open the command palette with Ctrl + Shift + P.

  2. Type Qualys to see all available Qualys commands.
  3. Select Qualys IaC configuration to bring up the settings page.
  4. Fill in the input fields such as Platform URL, Username, Password, and more.

    Qualys_Iac_Scan_configuration.png

Available Commands

The following commands are available from the command palette.

  • Qualys IaC Scan: Performs a scan on a Terraform file opened on Visual Studio Code editor.

  • Qualys IaC configuration: Adjust Qualys IaC configuration for a particular project.

Configure Authentication

Connect your Qualys account to the VS Code extension to run IaC scans. The extension supports three authentication methods: Basic Authentication, Qualys OAuth (OIDC) Authentication, and Identity Provider (IDP) Authentication.

To open the configuration page:

  1. Open the command palette with Ctrl + Shift + P.

  2. Type Qualys and select Qualys IaC configuration.

The configuration page displays all available fields. Fill in only the fields relevant to your chosen authentication method and set the Authentication Type accordingly.

The VSCode extension uses the native configuration space. All fields are visible at the same time. Leave the fields that do not apply to your authentication method empty.

Basic Authentication

Use Basic Authentication to connect with your Qualys username and password.

Basic Authentication.

  1. Set Authentication Type to BASIC.

  2. Provide the following details:

    • Platform URL - Enter your Qualys platform URL.
    • Username - Enter your Qualys username.
    • Password - Enter your Qualys password.

Qualys OAuth (OIDC) Authentication

Use Qualys OAuth (OIDC) Authentication to connect with a client ID and client secret generated from the Qualys platform. With OIDC, Qualys manages the token generation.

OIDC Authentication.

A single user can create multiple client IDs with different roles and modules enabled.

To create a user-level client, see Set up Token-based Authentication from UI.

  1. Set Authentication Type to OIDC.

  2. Provide the following details:

    • Platform URL - Enter your Qualys platform URL.
    • Client ID - Enter the client ID generated from the Qualys platform.
    • Client Secret - Enter the client secret generated from the Qualys platform.

Identity Provider (IDP) Authentication

Use Identity Provider (IDP) Authentication to connect through an external identity provider such as Okta. With this method, token generation is handled by your third-party identity provider rather than Qualys. The token is then passed to Qualys as a bearer token to access the platform.

IDP authentication.

For more details, see API Authentication using IdP Provider Tokens.

Before you use IDP authentication, your IT team must configure the Identity Provider and provide you with the required credentials (Client ID, Client Secret, and Token URL). Authentication requests fail until this setup is complete.

  1. Set Authentication Type to IDP.

  2. Provide the following details:

    • Platform URL - Enter your Qualys platform URL.
    • Client ID - Enter the client ID configured for your Identity Provider.
    • Client Secret - Enter the client secret configured for your Identity Provider.
    • Token URL - Enter the URL of your Identity Provider token endpoint. The extension sends an authentication request to this endpoint to obtain an access token.
    • Scope - (Optional) Enter the scope to request from your Identity Provider. Leave this field empty unless your IDP configuration requires it.
    • Audience - (Optional) Enter the audience value configured for your Identity Provider. The audience value can be a URI or an entity identifier, depending on your IDP provider. If your IDP requires it, this value must match the audience configured in QAS.

If authentication fails, review the console output. The extension displays the selected authentication type and reports errors returned by your Identity Provider or QAS, making it easier to troubleshoot authentication failures.

Next Step

Trigger Scan