Skip to content

Conversation

@zsoltgyulai94
Copy link
Contributor

@zsoltgyulai94 zsoltgyulai94 commented Dec 17, 2025

Documented OAuth2 for several destinations.

Resolves: #263

Signed-off-by: Zsolt Gyulai (zgyulai) <zsolt.gyulai@quest.com>

{% include doc/admin-guide/options/cert-file.md %}

{% include doc/admin-guide/options/cloud-auth.md %}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

azure-auth-header() is still missing here, even though it can be considered as an obsolete option, it is still the only pure "C" solution, see we should keep it currently

@@ -0,0 +1,15 @@
## cloud-auth()

*Description:* Configures cloud-based authentication for the syslog-ng-otlp() destination. This option enables OAuth2 authentication for gRPC connections using the syslog-ng cloud authentication framework.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is not just for the yslog-ng-otlp(), it is an option fr all the http+grpc based destinations

- client_id()
- client_secret()
- token_url()
- scope() No newline at end of file
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and

auth-method(
    basic
    post-body
)
authorization-details(<string>)
refresh-offset(<number>)
resource(<string>)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also,
cloud-auth()
supports

  • azure()
  • gcp()

authentication methods

full keyword list is

  { "cloud_auth",               KW_CLOUD_AUTH },

  { "gcp",                          KW_GCP },
  { "service_account",              KW_SERVICE_ACCOUNT },
  {   "audience",                   KW_AUDIENCE },
  {   "key",                        KW_KEY },
  {   "scope",                      KW_SCOPE },
  {   "token_validity_duration",    KW_TOKEN_VALIDITY_DURATION },
  { "user_managed_service_account", KW_USER_MANAGED_SERVICE_ACCOUNT },
  {   "metadata_url",               KW_METADATA_URL },
  {   "name",                       KW_NAME },

  { "azure",                         KW_AZURE },
  { "app_id",                        KW_APP_ID },
  { "app_secret",                    KW_APP_SECRET },
  { "monitor",                       KW_MONITOR },
  { "tenant_id",                     KW_TENANT_ID },

  { "oauth2",                        KW_OAUTH2 },
  { "auth_method",                   KW_AUTH_METHOD },
  {   "basic",                       KW_BASIC },
  {   "post_body",                   KW_POST_BODY },
  { "authorization_details",         KW_AUTHORIZATION_DETAILS },
  { "client_id",                     KW_CLIENT_ID },
  { "client_secret",                 KW_CLIENT_SECRET },
  { "refresh_offset",                KW_REFRESH_OFFSET },
  { "resource",                      KW_RESOURCE },
  // scope is reused from GCP
  { "token_url",                     KW_TOKEN_URL },

@@ -0,0 +1,15 @@
## cloud-auth()

*Description:* Configures cloud-based authentication for the syslog-ng-otlp() destination. This option enables OAuth2 authentication for gRPC connections using the syslog-ng cloud authentication framework.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cloud authentication module
instead


### oauth2()

Configures OAuth2 authentication for gRPC-based destinations. Tokens are automatically injected into gRPC metadata for each request.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it works in http destinations as well
in that case its content added to the HTTP header

};
```

### Example: Configure syslog-ng-otlp() destination using OAuth2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

though syslog-ng-otlp() is based on opentelemetry() but the server side (source) does not implement oauth2 (yet?!)
so, this will not work between 2 syslog-ng-otlp() peers

just do not not modify this doc file plz

- client_id()
- client_secret()
- token_url()
- scope() No newline at end of file
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also,
cloud-auth()
supports

  • azure()
  • gcp()

authentication methods

full keyword list is

  { "cloud_auth",               KW_CLOUD_AUTH },

  { "gcp",                          KW_GCP },
  { "service_account",              KW_SERVICE_ACCOUNT },
  {   "audience",                   KW_AUDIENCE },
  {   "key",                        KW_KEY },
  {   "scope",                      KW_SCOPE },
  {   "token_validity_duration",    KW_TOKEN_VALIDITY_DURATION },
  { "user_managed_service_account", KW_USER_MANAGED_SERVICE_ACCOUNT },
  {   "metadata_url",               KW_METADATA_URL },
  {   "name",                       KW_NAME },

  { "azure",                         KW_AZURE },
  { "app_id",                        KW_APP_ID },
  { "app_secret",                    KW_APP_SECRET },
  { "monitor",                       KW_MONITOR },
  { "tenant_id",                     KW_TENANT_ID },

  { "oauth2",                        KW_OAUTH2 },
  { "auth_method",                   KW_AUTH_METHOD },
  {   "basic",                       KW_BASIC },
  {   "post_body",                   KW_POST_BODY },
  { "authorization_details",         KW_AUTHORIZATION_DETAILS },
  { "client_id",                     KW_CLIENT_ID },
  { "client_secret",                 KW_CLIENT_SECRET },
  { "refresh_offset",                KW_REFRESH_OFFSET },
  { "resource",                      KW_RESOURCE },
  // scope is reused from GCP
  { "token_url",                     KW_TOKEN_URL },

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add OAUTH2 option documentation to cloudauth capable modules, both HTTP and GRPC

2 participants