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

Grpc service accounts #412

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

sodomelle
Copy link

It seems like gRPC sets the audience and scope options based on the gRPC service name, so they can't be set in the config.

Example usage:

destination {
    google-pubsub-grpc(
        project("test")
        topic("test")
        auth(service-account(key ("path_to_service_account_key.json")))
    );
};

@sodomelle sodomelle requested a review from alltilla December 7, 2024 10:33
Copy link
Contributor

github-actions bot commented Dec 7, 2024

This Pull Request introduces config grammar changes

axoflow/62228cd45e7744ded91a839c6893c8b2835c50f5 -> sodomelle/grpc-service-accounts

--- a/destination
+++ b/destination

 axosyslog-otlp(
     auth(
+        service-account(
+            <empty>
+            key(<path>)
+            token-validity-duration(<number>)
+        )
     )
 )

 bigquery(
     auth(
+        service-account(
+            <empty>
+            key(<path>)
+            token-validity-duration(<number>)
+        )
     )
 )

 clickhouse(
     auth(
+        service-account(
+            <empty>
+            key(<path>)
+            token-validity-duration(<number>)
+        )
     )
 )

 google-pubsub-grpc(
     auth(
+        service-account(
+            <empty>
+            key(<path>)
+            token-validity-duration(<number>)
+        )
     )
 )

 loki(
     auth(
+        service-account(
+            <empty>
+            key(<path>)
+            token-validity-duration(<number>)
+        )
     )
 )

 opentelemetry(
     auth(
+        service-account(
+            <empty>
+            key(<path>)
+            token-validity-duration(<number>)
+        )
     )
 )

 syslog-ng-otlp(
     auth(
+        service-account(
+            <empty>
+            key(<path>)
+            token-validity-duration(<number>)
+        )
     )
 )

sodomelle pushed a commit to sodomelle/axosyslog that referenced this pull request Dec 7, 2024
Signed-off-by: Tamás Kosztyu <[email protected]>
@sodomelle sodomelle force-pushed the grpc-service-accounts branch from 0c88974 to b17f698 Compare December 7, 2024 10:40
sodomelle pushed a commit to sodomelle/axosyslog that referenced this pull request Dec 7, 2024
Signed-off-by: Tamás Kosztyu <[email protected]>
@sodomelle sodomelle force-pushed the grpc-service-accounts branch from b17f698 to 0ef5c9e Compare December 7, 2024 10:46
sodomelle pushed a commit to sodomelle/axosyslog that referenced this pull request Dec 9, 2024
Signed-off-by: Tamás Kosztyu <[email protected]>
@sodomelle sodomelle force-pushed the grpc-service-accounts branch from 0ef5c9e to 7c6842f Compare December 9, 2024 10:23
sodomelle pushed a commit to sodomelle/axosyslog that referenced this pull request Dec 10, 2024
Signed-off-by: Tamás Kosztyu <[email protected]>
@sodomelle sodomelle force-pushed the grpc-service-accounts branch from 7c6842f to 07df96e Compare December 10, 2024 08:43
sodomelle pushed a commit to sodomelle/axosyslog that referenced this pull request Dec 10, 2024
Signed-off-by: Tamás Kosztyu <[email protected]>
@sodomelle sodomelle force-pushed the grpc-service-accounts branch from 07df96e to 8cdcc06 Compare December 10, 2024 14:59
Tamás Kosztyu added 3 commits December 10, 2024 16:00
@sodomelle sodomelle force-pushed the grpc-service-accounts branch from 8cdcc06 to d808a0c Compare December 10, 2024 15:00
Copy link
Member

@alltilla alltilla left a comment

Choose a reason for hiding this comment

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

2 minor news entry related comments, otherwise approve!

};
```

Note: It seems like gRPC sets the audience and scope options
Copy link
Member

Choose a reason for hiding this comment

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

We should be more direct with this, something like:

Note: In contrary to the `http()` destination's similar option,
we do not need to manually set the audience here as it is
automatically recognized by the underlying gRPC API.

@@ -0,0 +1,15 @@
grpc: Added service account option for grpc destinations.
Copy link
Member

@alltilla alltilla Dec 11, 2024

Choose a reason for hiding this comment

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

Let's name all the relevant destinations:

bigquery(), google-pubsub-grpc(): Added service-account() authentication option.

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.

2 participants