Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CCP - Unable to use placeholder inputs in request headers #9456

Closed
tonytilbo opened this issue Nov 23, 2023 · 9 comments
Closed

CCP - Unable to use placeholder inputs in request headers #9456

tonytilbo opened this issue Nov 23, 2023 · 9 comments
Assignees
Labels
Connector Connector specialty review needed

Comments

@tonytilbo
Copy link

We are attempting to create a code less connector to our data API, currently we require two headers to be passed with the request one is the API Key but we also require a Client ID header.

We get the users input using the 'UserRequestPlaceholdersInput'

{
    "parameters": {
        "enable": "true",
        "userRequestPlaceHoldersInput": [
            {
                "displayText": "Hostname",
                "requestObjectKey": "apiEndpoint",
                "placeHolderName": "{{hostname}}"
            },
            {
                "displayText": "Client ID",
                "requestObjectKey": "apiEndpoint",
                "placeHolderName": "{{client_id}}"
            }
        ]
    },
    "type": "APIKey"
}

Then attempt to use this placeholder in the 'headers' section of the pollingConfig.request section

"pollingConfig": {
    "auth": {
        "authType": "APIKey",
        "APIKeyName": "ApiKey",
        "IsAPIKeyInPostPayload": false
    },
    "request": {
        "apiEndpoint": "https://{{hostname}/route",
        "httpMethod": "Get",
        "retryCount": 2,
        "queryWindowInMin": 5,
        "timeoutInSeconds": 120,
        "headers": {
            "Accept": "application/json",
            "ClientId": "{{client_id}}"
        }
    }

Describe the solution you'd like
I would like the input that the users entered to be set on the request header.

Describe alternatives you've considered
We can of course change how the API works to accept only an API Key but would rather we were able to pass users inputted values in headers as a part of the request.

Copy link
Contributor

Thank you for submitting an Issue to the Azure Sentinel GitHub repo! You should expect an initial response to your Issue from the team within 5 business days. Note that this response may be delayed during holiday periods. For urgent, production-affecting issues please raise a support ticket via the Azure Portal.

@v-muuppugund
Copy link
Contributor

Hi @tonytilbo , Thanks for flagging this issue, we will investigate this issue and get back to you with some updates by 28Nov23. Thanks!

@v-sudkharat v-sudkharat added the Connector Connector specialty review needed label Nov 23, 2023
@tonytilbo
Copy link
Author

tonytilbo commented Nov 30, 2023

@v-muuppugund is there any update yet?

@v-sudkharat
Copy link
Contributor

Hi @tonytilbo, Could you please share solution name with us or file path in which you are getting issue. Thanks!

@tonytilbo
Copy link
Author

tonytilbo commented Dec 1, 2023

This isn't published anywhere yet as we are just testing connecting to our API. The code snippet above should give you everything you need though.

@v-sudkharat
Copy link
Contributor

@tonytilbo, thank you for your response, we will check on this and get by to you by - 11-12-2023. Thanks!

@v-muuppugund
Copy link
Contributor

v-muuppugund commented Dec 15, 2023

Hi @tonytilbo ,Apologies for the delayed response ,Could you please follow the documentation (https://learn.microsoft.com/en-us/azure/sentinel/create-codeless-connector?tabs=deploy-via-arm-template%2Cconnect-via-the-azure-portal#request-configuration) Please "type": "OAuth2",
"ClientSecret": "{{clientSecret}}",
"ClientId": "{{clientId}}",
"GrantType": "client_credentials", or OAuth if outh need to generate token,Please use the respective authentication mechanism and request parameters in request i,e. "queryTimeFormat": "yyyy-MM-ddTHH:mm:ssZ",
"retryCount": 2,
"timeoutInSeconds": 60,
"headers": {
"Accept": "application/json",
"User-Agent": "Scuba"
},
"queryParameters" etc,,Please let me know if need more details

@v-muuppugund
Copy link
Contributor

Hi @tonytilbo ,Gentle reminder,,Could you please follow the documentation (https://learn.microsoft.com/en-us/azure/sentinel/create-codeless-connector?tabs=deploy-via-arm-template%2Cconnect-via-the-azure-portal#request-configuration) Please "type": "OAuth2",
"ClientSecret": "{{clientSecret}}",
"ClientId": "{{clientId}}",
"GrantType": "client_credentials", or OAuth if outh need to generate token,Please use the respective authentication mechanism and request parameters in request i,e. "queryTimeFormat": "yyyy-MM-ddTHH:mm:ssZ",
"retryCount": 2,
"timeoutInSeconds": 60,
"headers": {
"Accept": "application/json",
"User-Agent": "Scuba"
},
"queryParameters" etc,,Please let me know if need more details

@v-sudkharat
Copy link
Contributor

Hi, @tonytilbo, since we have not received a response in the last 5 days, we are closing your issue- #9456 as per our standard operating procedures. If you still need support for this issue, feel free to re-open at any time. Thank you for your co-operation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Connector Connector specialty review needed
Projects
None yet
Development

No branches or pull requests

4 participants