Summary

OpenID Connect (OIDC) is a federated authentication protocol that lets LogScale delegate user authentication to an external identity provider (IdP). When an OIDC provider is configured, LogScale redirects users to the IdP for login, then maps claims in the returned token to LogScale usernames, groups, and roles. Domain mappings on the provider determine which email domains route users to this IdP automatically.

The updateOIDCIdentityProvider() mutation modifies an existing OIDC provider configuration. You must supply the provider id, the name, the clientID and clientSecret registered with the IdP, the issuer URL, the authorizationEndpoint, the tokenEndpointAuthMethod, the domains list, the scopes list, the userClaim, and enableDebug. Optional fields such as groupsClaim, lazyCreateUsers, and defaultIdp adjust group mapping, user provisioning behavior, and instance-level defaults respectively; omit them to leave those properties unchanged. To create a new OIDC provider, use newOIDCIdentityProvider() instead.

Syntax

graphql
updateOIDCIdentityProvider(
      input: UpdateOidcConfigurationInput!
   ): OidcIdentityProvider!

The mutation accepts a single required input argument of type UpdateOidcConfigurationInput!. The required fields are id, name, clientID, clientSecret, issuer, authorizationEndpoint, tokenEndpointAuthMethod, domains, scopes, userClaim, and enableDebug. Optional fields such as tokenEndpoint, JWKSEndpoint, userInfoEndpoint, groupsClaim, lazyCreateUsers, and defaultIdp let you configure endpoint overrides, group mapping, user provisioning, and the instance-level default provider.

Input parameters

The required fields are id (the unique identifier of the OIDC configuration to update), name (the display name for the provider), clientID and clientSecret (the credentials registered for LogScale with the IdP), issuer (the base URL of the IdP, used to verify token signatures and construct endpoint URLs if discovery is available), authorizationEndpoint (the URL to which LogScale redirects users for authentication), tokenEndpointAuthMethod (how LogScale authenticates against the token endpoint; either client_secret_basic to send credentials in the HTTP Authorization header or client_secret_post to send them as POST body parameters; defaults to client_secret_basic unless the discovery endpoint indicates it is unsupported), domains (the list of email domains that route users to this provider automatically), scopes (additional OAuth scopes to request beyond the default openid, email, and profile), userClaim (the token claim LogScale maps to the LogScale username; defaults to humio-user and can be set to email when email addresses are used as usernames), and enableDebug (set to true to write detailed OIDC authentication events to the LogScale audit log).

Optional fields override derived values or adjust provider behavior. Set tokenEndpoint to provide an explicit token exchange URL when the IdP does not publish a discovery document. Set JWKSEndpoint to specify an explicit key set URL for token signature validation. Set userInfoEndpoint to provide an explicit user info URL for resolving user attributes from an access token. Set groupsClaim to name the token claim LogScale maps to groups; the claim value must be a string array and defaults to humio-groups. Set lazyCreateUsers to true to defer LogScale account creation until the user first logs in through this provider, rather than provisioning accounts immediately. Set defaultIdp to true to make this provider the instance-level default; only one provider can hold this designation at a time. Omit optional fields to leave those properties unchanged.

Table: UpdateOidcConfigurationInput Input Datatype

ParameterTypeRequiredDefaultStabilityAvailabilityDescription
JWKSEndpointString  Long-Term A URL to the JWKS endpoint for retrieving keys for validating tokens. Required.
authorizationEndpointStringyes Long-Term A URL to the endpoint a user should be redirected to when authorizing. Required for clients.
clientIDStringyes Long-Term The unique identifier for the client.
clientSecretStringyes Long-Term The client's password or passphrase for the identity provider.
defaultIdpBoolean  Long-Term The default identity provider.
domainsStringyes Long-Term The domains associated with the OIDC configuration.
enableDebugBooleanyes Long-Term Whether to enable debugging.
federatedIdpString  Long-Term The Federated IdP.
groupsClaimString  Long-Term The name of the claim to interpret as the groups in LogScale. The value in the claim must be an array of strings. Optional. Defaults to humio-groups.
humioOwnedBoolean  Long-Term Whether authentication is managed by LogScale.
idStringyes Long-Term The unique identifier for the OpenId Connect (OIDC) configuration to update.
issuerStringyes Long-Term The issuer of the OIDC.
lazyCreateUsersBoolean  Long-Term Whether to wait to create users until necessary.
nameStringyes Long-Term The name of the OIDC identify provider.
registrationEndpointString  Long-Term To use OIDC as a client, PUBLIC_URL must be set, LogScale must be registered as a client with your OpenID provider, and the provider must allow %PUBLIC_URL%/auth/oidc as a valid redirect endpoint for the client.
scopeClaimString  Long-Term The claim or user attributes for the scope.
scopesStringyes Long-Term Comma-separated list of scopes to add in addition to the default requested scopes (openid, email, and profile).
tokenEndpointString  Long-Term A URL to the token endpoint used to exchange a authentication code to an access token. Required for clients.
tokenEndpointAuthMethodStringyes Long-Term The authentication method used to authenticate LogScale against the token endpoint. Can either be client_secret_basic or client_secret_post for placing the client id and secret in either basic auth or post data, respectively. Defaults to client_secret_basic, or client_secret_post if client_secret_basic is not supported as per the discovery endpoint.
userClaimStringyes Long-Term The name of the claim to interpret as username in LogScale. The value in the claim must be a string. Defaults to humio-user. Can be set to email if using emails as usernames.
userInfoEndpointString  Long-Term A URL to the user info endpoint used to retrieve user information from an access token.

Example

Raw
graphql
mutation {
  updateOIDCIdentityProvider( input:
    { id: "abc123",
      name: "myOIDC",
      clientID: "def456",
      clientSecret: "MD39xf83M301",
      issuer: "https://my.oidc-idp.com",
      authorizationEndpoint: "https://my.oidc-idp.com/authorize",
      tokenEndpointAuthMethod: "client_secret_basic",
      domains: ["humio"],
      scopes: [ "profile", "email", "openid" ],
      userClaim: "user",
      enableDebug: false
    }
  )
 { id }
}
Mac OS or Linux (curl)
shell
curl -v -X POST $YOUR_LOGSCALE_URL/graphql \
    -H "Authorization: Bearer $TOKEN" \
    -H "Content-Type: application/json" \
    -d @- << EOF
{"query" : "mutation {
  updateOIDCIdentityProvider( input:
    { id: \"abc123\",
      name: \"myOIDC\",
      clientID: \"def456\",
      clientSecret: \"MD39xf83M301\",
      issuer: \"https://my.oidc-idp.com\",
      authorizationEndpoint: \"https://my.oidc-idp.com/authorize\",
      tokenEndpointAuthMethod: \"client_secret_basic\",
      domains: [\"humio\"],
      scopes: [ \"profile\", \"email\", \"openid\" ],
      userClaim: \"user\",
      enableDebug: false
    }
  )
 { id }
}"
}
EOF
Mac OS or Linux (curl) One-line
shell
curl -v -X POST $YOUR_LOGSCALE_URL/graphql \
    -H "Authorization: Bearer $TOKEN" \
    -H "Content-Type: application/json" \
    -d @- << EOF
{"query" : "mutation {
  updateOIDCIdentityProvider( input:
    { id: \"abc123\",
      name: \"myOIDC\",
      clientID: \"def456\",
      clientSecret: \"MD39xf83M301\",
      issuer: \"https://my.oidc-idp.com\",
      authorizationEndpoint: \"https://my.oidc-idp.com/authorize\",
      tokenEndpointAuthMethod: \"client_secret_basic\",
      domains: [\"humio\"],
      scopes: [ \"profile\", \"email\", \"openid\" ],
      userClaim: \"user\",
      enableDebug: false
    }
  )
 { id }
}"
}
EOF
Windows Cmd and curl
shell
curl -v -X POST $YOUR_LOGSCALE_URL/graphql ^
    -H "Authorization: Bearer $TOKEN" ^
    -H "Content-Type: application/json" ^
    -d @'{"query" : "mutation { ^
  updateOIDCIdentityProvider( input: ^
    { id: \"abc123\", ^
      name: \"myOIDC\", ^
      clientID: \"def456\", ^
      clientSecret: \"MD39xf83M301\", ^
      issuer: \"https://my.oidc-idp.com\", ^
      authorizationEndpoint: \"https://my.oidc-idp.com/authorize\", ^
      tokenEndpointAuthMethod: \"client_secret_basic\", ^
      domains: [\"humio\"], ^
      scopes: [ \"profile\", \"email\", \"openid\" ], ^
      userClaim: \"user\", ^
      enableDebug: false ^
    } ^
  ) ^
 { id } ^
}" ^
} '
Windows Powershell and curl
powershell
curl.exe -X POST 
    -H "Authorization: Bearer $TOKEN"
    -H "Content-Type: application/json"
    -d '{"query" : "mutation {
  updateOIDCIdentityProvider( input:
    { id: \"abc123\",
      name: \"myOIDC\",
      clientID: \"def456\",
      clientSecret: \"MD39xf83M301\",
      issuer: \"https://my.oidc-idp.com\",
      authorizationEndpoint: \"https://my.oidc-idp.com/authorize\",
      tokenEndpointAuthMethod: \"client_secret_basic\",
      domains: [\"humio\"],
      scopes: [ \"profile\", \"email\", \"openid\" ],
      userClaim: \"user\",
      enableDebug: false
    }
  )
 { id }
}"
}'
    "$YOUR_LOGSCALE_URL/graphql"
Perl
perl
#!/usr/bin/perl

use HTTP::Request;
use LWP;

my $TOKEN = "TOKEN";

my $uri = '$YOUR_LOGSCALE_URL/graphql';

my $query = "mutation {
  updateOIDCIdentityProvider( input:
    { id: \"abc123\",
      name: \"myOIDC\",
      clientID: \"def456\",
      clientSecret: \"MD39xf83M301\",
      issuer: \"https://my.oidc-idp.com\",
      authorizationEndpoint: \"https://my.oidc-idp.com/authorize\",
      tokenEndpointAuthMethod: \"client_secret_basic\",
      domains: [\"humio\"],
      scopes: [ \"profile\", \"email\", \"openid\" ],
      userClaim: \"user\",
      enableDebug: false
    }
  )
 { id }
}";
$query =~ s/\n/ /g;
my $json = sprintf('{"query" : "%s"}',$query);
my $req = HTTP::Request->new("POST", $uri );

$req->header("Authorization" => "Bearer $TOKEN");
$req->header("Content-Type" => "application/json");

$req->content( $json );

my $lwp = LWP::UserAgent->new;

my $result = $lwp->request( $req );

print $result->{"_content"},"\n";
Python
python
#! /usr/local/bin/python3

import requests

url = '$YOUR_LOGSCALE_URL/graphql'
mydata = r'''{"query" : "mutation {
  updateOIDCIdentityProvider( input:
    { id: \"abc123\",
      name: \"myOIDC\",
      clientID: \"def456\",
      clientSecret: \"MD39xf83M301\",
      issuer: \"https://my.oidc-idp.com\",
      authorizationEndpoint: \"https://my.oidc-idp.com/authorize\",
      tokenEndpointAuthMethod: \"client_secret_basic\",
      domains: [\"humio\"],
      scopes: [ \"profile\", \"email\", \"openid\" ],
      userClaim: \"user\",
      enableDebug: false
    }
  )
 { id }
}"
}'''

resp = requests.post(url,
                     data = mydata,
                     headers = {
   "Authorization" : "Bearer $TOKEN",
   "Content-Type" : "application/json"
}
)

print(resp.text)
Node.js
javascript
const https = require('https');

const data = JSON.stringify(
    {"query" : "mutation {
  updateOIDCIdentityProvider( input:
    { id: \"abc123\",
      name: \"myOIDC\",
      clientID: \"def456\",
      clientSecret: \"MD39xf83M301\",
      issuer: \"https://my.oidc-idp.com\",
      authorizationEndpoint: \"https://my.oidc-idp.com/authorize\",
      tokenEndpointAuthMethod: \"client_secret_basic\",
      domains: [\"humio\"],
      scopes: [ \"profile\", \"email\", \"openid\" ],
      userClaim: \"user\",
      enableDebug: false
    }
  )
 { id }
}"
}
);


const options = {
  hostname: '$YOUR_LOGSCALE_URL',
  path: 'graphql',
  port: 443,
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Content-Length': data.length,
    Authorization: 'BEARER ' + process.env.TOKEN,
    'User-Agent': 'Node',
  },
};

const req = https.request(options, (res) => {
  let data = '';
  console.log(`statusCode: ${res.statusCode}`);

  res.on('data', (d) => {
    data += d;
  });
  res.on('end', () => {
    console.log(JSON.parse(data).data);
  });
});

req.on('error', (error) => {
  console.error(error);
});

req.write(data);
req.end();
Example Responses
Success (HTTP Response Code 200 OK)
json
{
  "data": {
    "updateOIDCIdentityProvider": {
      "id": "abc123"
    }
  }
}

Returned values

The mutation returns a non-null OidcIdentityProvider! object reflecting the updated configuration. The id field contains the unique provider identifier; store this value to update the provider again in the future. The name field returns the display name. The clientId and clientSecret fields return the registered client credentials. The issuer field returns the IdP base URL. The authorizationEndpoint, tokenEndpoint, userInfoEndpoint, and jwksEndpoint fields return the configured endpoint URLs; null values indicate the endpoint is not explicitly set and will be derived from the issuer or discovery document at runtime. The tokenEndpointAuthMethod field returns the active authentication method for the token endpoint. The domains field returns the email domains that route users to this provider. The scopes field returns the configured scope list. The userClaim field returns the claim mapped to LogScale usernames. The groupsClaim field returns the claim mapped to LogScale groups; a null value means no group claim is configured and group membership is not synchronized from this provider. The defaultIdp field indicates whether this provider is the instance-level default. The lazyCreateUsers field indicates whether account creation is deferred until first login. The humioManaged field indicates whether LogScale manages the authentication configuration for this provider. The debug field reflects whether detailed OIDC authentication events are written to the audit log. The authenticationMethod field returns the active authentication method as an AuthenticationMethodAuth interface value.

Table: OidcIdentityProvider Datatype

ParameterTypeRequiredDefaultStabilityAvailabilityDescription
authenticationMethodAuthenticationMethodAuthyes Long-Term The authentication method used. See AuthenticationMethodAuth.
authorizationEndpointstring  Long-Term A URL to the endpoint a user should be redirected to when authorizing.
clientIdstringyes Long-Term The unique identifier for the client.
clientSecretstringyes Long-Term The password for the client.
debugbooleanyes Long-Term Whether debugging is enabled.
defaultIdpbooleanyes Long-Term Whether the identity provider is the default.
domains[string]yes Long-Term The domains authorized by the OIDC identity providers.
federatedIdpstring  Long-Term The Federated IdP.
groupsClaimstring  Long-Term The name of the claim to interpret as the groups in LogScale. The value in the claim must be an array of strings. Optional. Defaults to humio-groups.
humioManagedbooleanyes Long-Term Whether authentication is managed by LogScale.
idstringyes Long-Term The unique identifier for the OIDC identity provider.
issuerstringyes Long-Term The issuer of the OIDC authentication.
jwksEndpointstring  Long-Term A URL to the JWKS endpoint for retrieving keys for validating tokens. Required.
lazyCreateUsersbooleanyes Long-Term Whether to wait to create users until necessary.
namestringyes Long-Term The name of the OIDC identity provider.
registrationEndpointstring  Long-Term To use OIDC as a client, PUBLIC_URL must be set, LogScale must be registered as a client with your OpenID provider, and the provider must allow %PUBLIC_URL%/auth/oidc as a valid redirect endpoint for the client.
scopeClaimstring  Long-Term The scope claim.
scopes[string]yes Long-Term Comma-separated list of scopes to add in addition to the default requested scopes (openid, email, and profile).
tokenEndpointstring  Long-Term A URL to the token endpoint used to exchange a authentication code to an access token. Required for clients.
tokenEndpointAuthMethodstringyes Long-Term A URL to the token endpoint used to exchange a authentication code to an access token. Required for clients.
userClaimstringyes Long-Term The name of the claim to interpret as username in LogScale. The value in the claim must be a string. Defaults to humio-user. Can be set to email if using emails as usernames.
userInfoEndpointstring  Long-Term A URL to the user info endpoint used to retrieve user information from an access token.