def build_signature(
    customer_id: str,
    shared_key: str,
    date: str,
    content_length: str,
    method: str,
    content_type: str,
    resource: str,
):
    """
    Builds the signature for authenticating requests to Azure Sentinel.

    Args:
        customer_id (str): The customer ID or workspace ID for Azure Sentinel.
        shared_key (str): The shared key for authentication with Azure Sentinel.
        date (str): The date and time of the request in RFC1123 format.
        content_length (int): The length of the request body in bytes.
        method (str): The HTTP method of the request.
        content_type (str): The content type of the request.
        resource (str): The resource being accessed.

    Returns:
        str: The authorization header value for the request.
    """

    x_headers = "x-ms-date:" + date
    string_to_hash = (
        method
        + "\n"
        + content_length
        + "\n"
        + content_type
        + "\n"
        + x_headers
        + "\n"
        + resource
    )
    bytes_to_hash = bytes(string_to_hash, encoding="utf-8")
    decoded_key = b64decode(shared_key)
    encoded_hash = b64encode(
        hmac.new(decoded_key, bytes_to_hash, digestmod=hashlib.sha256).digest()
    ).decode()
    authorization = "SharedKey {}:{}".format(customer_id, encoded_hash)
    return authorization

    Builds the signature for authenticating requests to Azure Sentinel.

    Args:
        customer_id (str): The customer ID or workspace ID for Azure Sentinel.
        shared_key (str): The shared key for authentication with Azure Sentinel.
        date (str): The date and time of the request in RFC1123 format.
        content_length (int): The length of the request body in bytes.
        method (str): The HTTP method of the request.
        content_type (str): The content type of the request.
        resource (str): The resource being accessed.

    Returns:
        str: The authorization header value for the request.
    
Solutions/HYAS Protect/Data Connectors/HyasProtect/utils.py