GitHub IAM

Integrate with GitHub services to perform Identity Lifecycle Management operations.

Identity and Access Management · GitHub

Details

IDGitHub IAM
ProviderMicrosoft
CategoryIdentity and Access Management
From Version6.0.0
Docker Imagedemisto/python3:3.12.13.10116658
Supported ModulesAgentix Cloud Runtime Security Cloud Posture Security XSIAM EDR Cortex Cloud

README

Note: This integration should be used as part of our IAM premium pack. For further details, visit our IAM pack documentation.
GitHub Integration consists of a set of API endpoints that enable you to automate provisioning of GitHub organization membership.
This integration was integrated and tested with version v2 of GitHub IT Admin.
For more information, please refer to the Identity Lifecycle Management article.

Configure GitHub IT Admin on Cortex XSOAR

  1. Navigate to Settings > Integrations > Servers & Services.
  2. Search for GitHub IT Admin.
  3. Click Add instance to create and configure a new integration instance.
Parameter Description Required
GitHub URL https://<domain>.github.com/   True
Token   False
Organization name   True
Trust any certificate (not secure)   False
Use system proxy settings   False
Allow creating users   False
Allow updating users   False
Allow disabling users   False
Automatically create user if not found in update and enable commands   False
Incoming Mapper   True
Outgoing Mapper Cortex XSOAR only parameter. False
  • To allow the integration to access the mapper from within the code, as required by the ILM pack, both mappers have to be configured in their proper respective fields and not in the “Mapper (outgoing)” dropdown list selector.
  1. Click Test to check that you are able to connect to the integration.

Commands

You can execute these commands from the Cortex XSOAR CLI, as part of an automation, or in a playbook.
After you successfully execute a command, a DBot message appears in the War Room with the command details.

iam-create-user


Creates a user.

Base Command

iam-create-user

Input

Argument Name Description Required
user-profile User Profile indicator details. Required

Context Output

Path Type Description
IAM.Vendor.active Boolean If true, the employee’s status is active, otherwise false.
IAM.Vendor.brand String Name of the integration.
IAM.Vendor.details string Indicates if the API was successful or provides error information.
IAM.Vendor.email String The employee’s email address.
IAM.Vendor.errorCode Number HTTP error response code.
IAM.Vendor.errorMessage String Reason why the API failed.
IAM.Vendor.id String The employee’s user ID in the app.
IAM.Vendor.instanceName string Name of the integration instance.
IAM.Vendor.success Boolean If true, indicates that the command was executed successfully.
IAM.Vendor.username String The employee’s username in the app.

Command Example

!iam-create-user user-profile={\"email\":\"testdemisto2@paloaltonetworks.com\", \"lastname\":\"Test\",\"firstname\":\"Demisto\"}

Human Readable Output

Create User Results (GitHub IT Admin)

brand instanceName success active id username email details
GitHub IT Admin GitHub IT Admin_instance_1 true true 00uujxnbh3uJw4tWA0h7 testdemisto2@paloaltonetworks.com testdemisto2@paloaltonetworks.com id: 00uujxnbh3uJw4tWA0h7
status: PROVISIONED
created: 2020-10-18T17:54:30.000Z
activated: 2020-10-18T17:54:30.000Z
statusChanged: 2020-10-18T17:54:30.000Z
lastLogin: null
lastUpdated: 2020-10-18T17:54:30.000Z
passwordChanged: null
type: {“id”: “oty8zfz6plq7b0r830h7”}
profile: {“firstName”: “Demisto”, “lastName”: “Test”, “mobilePhone”: null, “secondEmail”: null, “login”: “testdemisto2@paloaltonetworks.com”, “email”: “testdemisto44@paloaltonetworks.com”}
credentials: {“provider”: {“type”: “OKTA”, “name”: “OKTA”}}
_links: {“suspend”: {“href”: “https://panw-test.oktapreview.com/api/v1/users/00uujxnbh3uJw4tWA0h7/lifecycle/suspend”, “method”: “POST”}, “schema”: {“href”: “https://panw-test.oktapreview.com/api/v1/meta/schemas/user/osc8zfz6plq7b0r830h7”}, “resetPassword”: {“href”: “https://panw-test.oktapreview.com/api/v1/users/00uujxnbh3uJw4tWA0h7/lifecycle/reset_password”, “method”: “POST”}, “reactivate”: {“href”: “https://panw-test.oktapreview.com/api/v1/users/00uujxnbh3uJw4tWA0h7/lifecycle/reactivate”, “method”: “POST”}, “self”: {“href”: “https://panw-test.oktapreview.com/api/v1/users/00uujxnbh3uJw4tWA0h7”}, “type”: {“href”: “https://panw-test.oktapreview.com/api/v1/meta/types/user/oty8zfz6plq7b0r830h7”}, “deactivate”: {“href”: “https://panw-test.oktapreview.com/api/v1/users/00uujxnbh3uJw4tWA0h7/lifecycle/deactivate”, “method”: “POST”}}

iam-update-user


Updates an existing user with the data passed in the user-profile argument.

Base Command

iam-update-user

Input

Argument Name Description Required
user-profile A User Profile indicator. Required
create-if-not-exists When true, the user will be created when the passed User Profile doesn’t exist in Active Directory. Default is ‘true’. Optional

Context Output

Path Type Description
IAM.Vendor.active Boolean If true, indicates that the employee’s status is active.
IAM.Vendor.brand String Name of the integration.
IAM.Vendor.details string Indicates if the API was successful or provides error information.
IAM.Vendor.email String The employee’s email address.
IAM.Vendor.errorCode Number HTTP error response code.
IAM.Vendor.errorMessage String Reason why the API failed.
IAM.Vendor.id String The employee’s user ID in the app.
IAM.Vendor.instanceName string Name of the integration instance.
IAM.Vendor.success Boolean If true, indicates that the command was executed successfully.
IAM.Vendor.username String The employee’s username in the app.

Command Example

!iam-update-user user-profile={\"email\":\"testdemisto2@paloaltonetworks.com\", \"firstname\":\"Demisto-Test\"}

Human Readable Output

Update User Results (GitHub IT Admin)

brand instanceName success active id username email details
GitHub IT Admin GitHub IT Admin_instance_1 true true 00uujxnbh3uJw4tWA0h7 testdemisto2@paloaltonetworks.com testdemisto2@paloaltonetworks.com id: 00uujxnbh3uJw4tWA0h7
status: PROVISIONED
created: 2020-10-18T17:54:30.000Z
activated: 2020-10-18T17:54:30.000Z
statusChanged: 2020-10-18T17:54:30.000Z
lastLogin: null
lastUpdated: 2020-10-18T17:56:53.000Z
passwordChanged: null
type: {“id”: “oty8zfz6plq7b0r830h7”}
profile: {“firstName”: “Demisto-Test”, “lastName”: “Test”, “mobilePhone”: null, “secondEmail”: null, “login”: “testdemisto2@paloaltonetworks.com”, “email”: “testdemisto2@paloaltonetworks.com”}
credentials: {“provider”: {“type”: “OKTA”, “name”: “OKTA”}}
_links: {“suspend”: {“href”: “https://panw-test.oktapreview.com/api/v1/users/00uujxnbh3uJw4tWA0h7/lifecycle/suspend”, “method”: “POST”}, “schema”: {“href”: “https://panw-test.oktapreview.com/api/v1/meta/schemas/user/osc8zfz6plq7b0r830h7”}, “resetPassword”: {“href”: “https://panw-test.oktapreview.com/api/v1/users/00uujxnbh3uJw4tWA0h7/lifecycle/reset_password”, “method”: “POST”}, “reactivate”: {“href”: “https://panw-test.oktapreview.com/api/v1/users/00uujxnbh3uJw4tWA0h7/lifecycle/reactivate”, “method”: “POST”}, “self”: {“href”: “https://panw-test.oktapreview.com/api/v1/users/00uujxnbh3uJw4tWA0h7”}, “type”: {“href”: “https://panw-test.oktapreview.com/api/v1/meta/types/user/oty8zfz6plq7b0r830h7”}, “deactivate”: {“href”: “https://panw-test.oktapreview.com/api/v1/users/00uujxnbh3uJw4tWA0h7/lifecycle/deactivate”, “method”: “POST”}}

iam-get-user


Retrieves a single user resource.

Base Command

iam-get-user

Input

Argument Name Description Required
user-profile A User Profile indicator. Required

Context Output

Path Type Description
IAM.Vendor.active Boolean If true, indicates that the employee’s status is active.
IAM.Vendor.brand String Name of the integration.
IAM.Vendor.details string Indicates if the API was successful or provides error information.
IAM.Vendor.email String The employee’s email address.
IAM.Vendor.errorCode Number HTTP error response code.
IAM.Vendor.errorMessage String Reason why the API failed.
IAM.Vendor.id String The employee’s user ID in the app.
IAM.Vendor.instanceName string Name of the integration instance.
IAM.Vendor.success Boolean If true, indicates that the command was executed successfully.
IAM.Vendor.username String The employee’s username in the app.

Command Example

!iam-get-user user-profile={\"email\":\"testdemisto2@paloaltonetworks.com\"}

Human Readable Output

Get User Results (GitHub IT Admin)

brand instanceName success active id username email details
GitHub IT Admin GitHub IT Admin_instance_1 true true 00uujxnbh3uJw4tWA0h7 testdemisto2@paloaltonetworks.com testdemisto2@paloaltonetworks.com id: 00uujxnbh3uJw4tWA0h7
status: PROVISIONED
created: 2020-10-18T17:54:30.000Z
activated: 2020-10-18T17:54:30.000Z
statusChanged: 2020-10-18T17:54:30.000Z
lastLogin: null
lastUpdated: 2020-10-18T17:56:53.000Z
passwordChanged: null
type: {“id”: “oty8zfz6plq7b0r830h7”}
profile: {“firstName”: “Demisto-Test”, “lastName”: “Test”, “mobilePhone”: null, “secondEmail”: null, “login”: “testdemisto2@paloaltonetworks.com”, “email”: “testdemisto2@paloaltonetworks.com”}
credentials: {“provider”: {“type”: “OKTA”, “name”: “OKTA”}}
_links: {“suspend”: {“href”: “https://panw-test.oktapreview.com/api/v1/users/00uujxnbh3uJw4tWA0h7/lifecycle/suspend”, “method”: “POST”}, “schema”: {“href”: “https://panw-test.oktapreview.com/api/v1/meta/schemas/user/osc8zfz6plq7b0r830h7”}, “resetPassword”: {“href”: “https://panw-test.oktapreview.com/api/v1/users/00uujxnbh3uJw4tWA0h7/lifecycle/reset_password”, “method”: “POST”}, “reactivate”: {“href”: “https://panw-test.oktapreview.com/api/v1/users/00uujxnbh3uJw4tWA0h7/lifecycle/reactivate”, “method”: “POST”}, “self”: {“href”: “https://panw-test.oktapreview.com/api/v1/users/00uujxnbh3uJw4tWA0h7”}, “type”: {“href”: “https://panw-test.oktapreview.com/api/v1/meta/types/user/oty8zfz6plq7b0r830h7”}, “deactivate”: {“href”: “https://panw-test.oktapreview.com/api/v1/users/00uujxnbh3uJw4tWA0h7/lifecycle/deactivate”, “method”: “POST”}}

iam-disable-user


Deletes an active user.

Base Command

iam-disable-user

Input

Argument Name Description Required
user-profile A User Profile indicator. Required

Context Output

Path Type Description
IAM.Vendor.active Boolean If true, indicates that the employee’s status is active.
IAM.Vendor.brand String Name of the integration.
IAM.Vendor.details string Indicates if the API was successful or provides error information.
IAM.Vendor.email String The employee’s email address.
IAM.Vendor.errorCode Number HTTP error response code.
IAM.Vendor.errorMessage String Reason why the API failed.
IAM.Vendor.id String The employee’s user ID in the app.
IAM.Vendor.instanceName string Name of the integration instance.
IAM.Vendor.success Boolean If true, indicates that the command was executed successfully.
IAM.Vendor.username String The employee’s username in the app.

Command Example

!iam-disable-user user-profile={\"email\":\"testdemisto2@paloaltonetworks.com\"}

Human Readable Output

Disable User Results (GitHub IT Admin)

brand instanceName success active id username email details
GitHub IT Admin GitHub IT Admin_instance_1 true false 00uujxnbh3uJw4tWA0h7 testdemisto2@paloaltonetworks.com testdemisto2@paloaltonetworks.com id: 00uujxnbh3uJw4tWA0h7
status: PROVISIONED
created: 2020-10-18T17:54:30.000Z
activated: 2020-10-18T17:54:30.000Z
statusChanged: 2020-10-18T17:54:30.000Z
lastLogin: null
lastUpdated: 2020-10-18T17:56:53.000Z
passwordChanged: null
type: {“id”: “oty8zfz6plq7b0r830h7”}
profile: {“firstName”: “Demisto-Test”, “lastName”: “Test”, “mobilePhone”: null, “secondEmail”: null, “login”: “testdemisto2@paloaltonetworks.com”, “email”: “testdemisto2@paloaltonetworks.com”}
credentials: {“provider”: {“type”: “OKTA”, “name”: “OKTA”}}
_links: {“self”: {“href”: “https://panw-test.oktapreview.com/api/v1/users/00uujxnbh3uJw4tWA0h7”}}

iam-enable-user


Create a deprovisioned user.

Base Command

iam-enable-user

Input

Argument Name Description Required
user-profile A User Profile indicator. Required
create-if-not-exists When true, the user will be created when the passed User Profile doesn’t exist in AD. Default is ‘true’. Optional

Context Output

Path Type Description
IAM.Vendor.active Boolean If true, indicates that the employee’s status is active.
IAM.Vendor.brand String Name of the integration.
IAM.Vendor.details string Indicates if the API was successful or provides error information.
IAM.Vendor.email String The employee’s email address.
IAM.Vendor.errorCode Number HTTP error response code.
IAM.Vendor.errorMessage String Reason why the API failed.
IAM.Vendor.id String The employee’s user ID in the app.
IAM.Vendor.instanceName string Name of the integration instance.
IAM.Vendor.success Boolean If true, indicates that the command was executed successfully.
IAM.Vendor.username String The employee’s username in the app.

Command Example

!iam-enable-user user-profile={\"email\":\"testdemisto2@paloaltonetworks.com\"}

Human Readable Output

Enable User Results (GitHub IT Admin)

brand instanceName success active id username email details
GitHub IT Admin GitHub IT Admin_instance_1 true true 00uujxnbh3uJw4tWA0h7 testdemisto2@paloaltonetworks.com testdemisto2@paloaltonetworks.com id: 00uujxnbh3uJw4tWA0h7
status: DEPROVISIONED
created: 2020-10-18T17:54:30.000Z
activated: 2020-10-18T17:54:30.000Z
statusChanged: 2020-10-18T17:54:30.000Z
lastLogin: null
lastUpdated: 2020-10-18T17:56:53.000Z
passwordChanged: null
type: {“id”: “oty8zfz6plq7b0r830h7”}
profile: {“firstName”: “Demisto-Test”, “lastName”: “Test”, “mobilePhone”: null, “secondEmail”: null, “login”: “testdemisto2@paloaltonetworks.com”, “email”: “testdemisto2@paloaltonetworks.com”}
credentials: {“provider”: {“type”: “OKTA”, “name”: “OKTA”}}
_links: {“self”: {“href”: “https://panw-test.oktapreview.com/api/v1/users/00uujxnbh3uJw4tWA0h7”}}

Configuration parameters

  • url — GitHub URL https://<domain>.github.com/ (required)
  • creds_token
  • token — Token
  • org — Organization name (required)
  • insecure — Trust any certificate (not secure)
  • proxy — Use system proxy settings
  • create-user-enabled — Allow creating users
  • update-user-enabled — Allow updating users
  • disable-user-enabled — Allow disabling users
  • create-if-not-exists — Automatically create user if not found in update and enable commands
  • mapper_in — Incoming Mapper (required)
  • mapper_out — Outgoing Mapper

Commands (5)

  • get-mapping-fields

    Retrieves a User Profile schema which holds all of the user fields within the application. Used for outgoing-mapping through the Get Schema option.

  • iam-create-user

    Creates a user.

  • iam-disable-user

    Disable an active user.

  • iam-get-user

    Retrieves a single user resource.

  • iam-update-user

    Updates an existing user with the data passed in the user-profile argument.

import demistomock as demisto
import pytest
from GitHub_IAM import Client, IAMUserProfile, create_user_command, get_user_command, update_user_command
from IAMApiModule import *
from requests import Session
from requests.models import Response

BASE_MOCK_URL = "https://test.com"
MOCK_ORG = "test123"


def mock_client():
    client = Client(base_url=BASE_MOCK_URL, org=MOCK_ORG, verify=False, headers={})
    return client


create_inp_schme = {"familyName": "J13", "givenName": "MJ", "userName": "TestID@networks.com", "emails": "TestID@networks.com"}

demisto.callingContext = {"context": {"IntegrationInstance": "Test", "IntegrationBrand": "Test"}}

GITHUB_CREATE_USER_OUTPUT = {
    "emails": [{"value": "TestID@networks.com", "type": "work", "primary": True}],
    "roles": [],
    "userName": "TestID@networks.com",
    "name": {"givenName": "MJ", "familyName": "J13"},
    "schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"],
    "id": "12345",
    "active": True,
    "meta": {
        "resourceType": "User",
        "created": "2020-11-23T09:26:31.000-08:00",
        "lastModified": "2020-11-23T09:26:31.000-08:00",
        "location": "https://api.github.com/scim/v2/abc",
    },
}

GITHUB_UPDATE_USER_OUTPUT = {
    "schemas": ["urn:ietf:paramsListResponse"],
    "totalResults": 1,
    "itemsPerPage": 1,
    "startIndex": 1,
    "Resources": [
        {
            "emails": [{"value": "TestID@networks.com", "type": "work", "primary": True}],
            "roles": [],
            "name": {"familyName": "J13", "givenName": "MJ"},
            "userName": "TestID@networks.com",
            "schemas": ["urn:ietf:User"],
            "id": "12345",
            "active": True,
            "meta": {
                "resourceType": "User",
                "created": "2020-11-23T09:26:31.000-08:00",
                "lastModified": "2020-11-23T09:26:31.000-08:00",
                "location": "//l",
            },
        }
    ],
}


def get_outputs_from_user_profile(user_profile):
    entry_context = user_profile.to_entry()
    outputs = entry_context.get("Contents")

    return outputs


def test_create_user_command(mocker):
    args = {"user-profile": {"emails": "mock@mock.com"}}
    client = mock_client()

    mocker.patch.object(client, "create_user", return_value=GITHUB_CREATE_USER_OUTPUT)
    mocker.patch.object(client, "get_user", return_value={"totalResults": 0})

    iam_user_profile = create_user_command(client, args, "mapper_out", True, True)
    outputs = get_outputs_from_user_profile(iam_user_profile)

    assert outputs.get("action") == IAMActions.CREATE_USER
    assert outputs.get("success") is True
    assert outputs.get("active") is True
    assert outputs.get("id") == "12345"
    assert outputs.get("username") == "TestID@networks.com"


def test_get_user_command__existing_user(mocker):
    client = mock_client()
    args = {"user-profile": {"emails": "mock@mock.com"}}

    mocker.patch.object(client, "get_user", return_value=GITHUB_UPDATE_USER_OUTPUT)
    mocker.patch.object(IAMUserProfile, "update_with_app_data", return_value={})

    iam_user_profile = get_user_command(client, args, "mapper_in", "mapper_out")
    outputs = get_outputs_from_user_profile(iam_user_profile)

    assert outputs.get("action") == IAMActions.GET_USER
    assert outputs.get("success") is True
    assert outputs.get("active") is True
    assert outputs.get("id") == "12345"
    assert outputs.get("username") == "TestID@networks.com"


@pytest.mark.parametrize(
    "args, mock_url",
    [
        (
            {"user-profile": {"emails": "mock@mock.com"}},
            f'{BASE_MOCK_URL}/scim/v2/organizations/{MOCK_ORG}/Users?filter=emails eq "mock@mock.com"',
        ),
        (
            {"user-profile": {"userName": "TestID@networks.com", "emails": "mock@mock.com"}},
            f'{BASE_MOCK_URL}/scim/v2/organizations/{MOCK_ORG}/Users?filter=userName eq "TestID@networks.com"',
        ),
        (
            {"user-profile": {"id": 12345, "userName": "TestID@networks.com", "emails": "mock@mock.com"}},
            f'{BASE_MOCK_URL}/scim/v2/organizations/{MOCK_ORG}/Users?filter=id eq "12345"',
        ),
    ],
)
def test_get_user_command_by_order(mocker, args, mock_url, requests_mock):
    """
    Given:
    - Cortex XSOAR arguments.

    When:
    - Executing get-user command.
    Cases:
    case a: User profile has email data.
    case b: User profile has email and username data.
    case c: User profile has email, username and id data.

    Then:
    - Ensure expected data is returned, and expected mocked URL is called.
    """
    client = mock_client()
    requests_mock.get(mock_url, json=GITHUB_UPDATE_USER_OUTPUT)
    mocker.patch.object(IAMUserProfile, "update_with_app_data", return_value={})

    iam_user_profile = get_user_command(client, args, "mapper_in", "mapper_out")
    outputs = get_outputs_from_user_profile(iam_user_profile)

    assert outputs.get("action") == IAMActions.GET_USER
    assert outputs.get("success") is True
    assert outputs.get("active") is True
    assert outputs.get("id") == "12345"
    assert outputs.get("username") == "TestID@networks.com"


def test_get_user_command__non_existing_user(mocker):
    client = mock_client()
    args = {"user-profile": {"emails": "mock@mock.com"}}

    mocker.patch.object(client, "get_user", return_value={})

    iam_user_profile = get_user_command(client, args, "mapper_in", "mapper_out")
    outputs = get_outputs_from_user_profile(iam_user_profile)

    assert outputs.get("action") == IAMActions.GET_USER
    assert outputs.get("success") is False
    assert outputs.get("errorCode") == IAMErrors.USER_DOES_NOT_EXIST[0]
    assert outputs.get("errorMessage") == IAMErrors.USER_DOES_NOT_EXIST[1]


def test_get_user_command__bad_response(mocker):
    client = mock_client()
    args = {"user-profile": {"emails": "mock@mock.com"}}

    bad_response = Response()
    bad_response.status_code = 500
    bad_response._content = b'{"errorCode": "mock_error_code", "errorSummary": "mock_error_summary", "message": "Not Found"}'

    mocker.patch.object(Session, "request", return_value=bad_response)

    iam_user_profile = get_user_command(client, args, "mapper_in", "mapper_out")
    outputs = get_outputs_from_user_profile(iam_user_profile)

    assert outputs.get("action") == IAMActions.GET_USER
    assert outputs.get("success") is False
    assert outputs.get("errorCode") == 500
    assert outputs.get("errorMessage") == "Not Found"


def test_create_user_command__user_already_exists(mocker):
    client = mock_client()
    args = {"user-profile": {"emails": "mock@mock.com"}}

    mocker.patch.object(client, "get_user", return_value=GITHUB_UPDATE_USER_OUTPUT)
    mocker.patch.object(client, "update_user", return_value=GITHUB_UPDATE_USER_OUTPUT)

    iam_user_profile = create_user_command(client, args, "mapper_out", True, True)
    outputs = get_outputs_from_user_profile(iam_user_profile)

    assert outputs.get("action") == IAMActions.UPDATE_USER
    assert outputs.get("success") is True


def test_update_user_command__non_existing_user(mocker):
    client = mock_client()
    args = {"user-profile": {"emails": "mock@mock.com"}}

    mocker.patch.object(client, "get_user", return_value={"totalResults": 0})
    mocker.patch.object(client, "create_user", return_value=GITHUB_CREATE_USER_OUTPUT)

    iam_user_profile = update_user_command(
        client, args, "mapper_out", is_update_enabled=True, is_create_enabled=True, create_if_not_exists=True
    )
    outputs = get_outputs_from_user_profile(iam_user_profile)

    assert outputs.get("action") == IAMActions.CREATE_USER
    assert outputs.get("success") is True
    assert outputs.get("active") is True
    assert outputs.get("id") == "12345"
    assert outputs.get("username") == "TestID@networks.com"


def test_update_user_command__command_is_disabled(mocker):
    client = mock_client()
    args = {"user-profile": {"emails": "mock@mock.com"}}

    mocker.patch.object(client, "get_user", return_value={"totalResults": 0})
    mocker.patch.object(client, "update_user", return_value=GITHUB_UPDATE_USER_OUTPUT)

    user_profile = update_user_command(
        client, args, "mapper_out", is_update_enabled=False, is_create_enabled=False, create_if_not_exists=False
    )
    outputs = get_outputs_from_user_profile(user_profile)

    assert outputs.get("action") == IAMActions.UPDATE_USER
    assert outputs.get("success") is True
    assert outputs.get("skipped") is True
    assert outputs.get("reason") == "Command is disabled."