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

[sentinel-intel/sentinel-incident] #2964

Open
pierremahot opened this issue Nov 14, 2024 · 0 comments
Open

[sentinel-intel/sentinel-incident] #2964

pierremahot opened this issue Nov 14, 2024 · 0 comments
Labels
feature use for describing a new feature to develop needs triage use to identify issue needing triage from Filigran Product team

Comments

@pierremahot
Copy link
Member

Use case

have better log on the sentinel connector checking the role inside the jwt token to have clear info on what is missing

Current Workaround

do the verification outside of the connector

token=$(curl --location --request POST "https://login.microsoftonline.com/$SENTINEL_INTEL_TENANT_ID/oauth2/v2.0/token" \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode "client_id=$SENTINEL_INTEL_CLIENT_ID" \
--data-urlencode 'scope=https://graph.microsoft.com/.default' \
--data-urlencode "client_secret=$SENTINEL_INTEL_CLIENT_SECRET" \
--data-urlencode 'grant_type=client_credentials'| jq -r .access_token)
# jwt decode token =>
{
    "aud": "https://graph.microsoft.com",
    "iss": "https://sts.windows.net/xxxx...xxxx/",
    "iat": xxxx...xxxx,
    "nbf": xxxx...xxxx,
    "exp": xxxx...xxxx,
    "aio": "xxxx...xxxx",
    "app_displayname": "OpenCTI",
    "appid": "xxxx...xxxx",
    "appidacr": "1",
    "idp": "https://sts.windows.net/xxxx...xxxx/",
    "idtyp": "app",
    "oid": "xxxx...xxxx",
    "rh": "xxxx...xxxx",
    "roles": [
        "ThreatIndicators.ReadWrite.OwnedBy"
    ],
    "sub": "xxxx...xxxx",
    "tenant_region_scope": "EU",
    "tid": "xxxx...xxxx",
    "uti": "xxxx...xxxx",
    "ver": "1.0",
    "wids": [
        "xxxx...xxxx"
    ],
    "xms_idrel": "xxxx...xxxx",
    "xms_tcdt": xxxx...xxxx
}

the current side effect is that the connector are not stopping just spamming a lot of log not really great.

Proposed Solution

add check of the role present on the token get with the first auth stage and stop the container if the role are not sufficient with a beautifull log

Additional Information

current auth


Would you be willing to submit a PR?

may be

@pierremahot pierremahot added feature use for describing a new feature to develop needs triage use to identify issue needing triage from Filigran Product team labels Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature use for describing a new feature to develop needs triage use to identify issue needing triage from Filigran Product team
Projects
None yet
Development

No branches or pull requests

1 participant