Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
[WIP] authenticated microservices #1238
base: master
Are you sure you want to change the base?
[WIP] authenticated microservices #1238
Changes from 13 commits
8009db2
d75fe3c
8796ed7
3c4d60a
90c27ca
b501eda
12f01d9
bb7f1de
8e27f7d
6121181
2b0900d
415c4f6
1f0e8f8
09df217
c235283
5c12d11
49a25a3
1de5b2f
86dd0a9
e390516
a612f55
148e053
f9c0984
6f33194
23bead9
bc037cc
6b048b6
bdf937a
698e2a5
2579328
20c7171
fdac9db
b69b3e4
39849e7
c288726
e53392d
2a6fd31
7a04db0
15ae7e3
92c4e01
cd60fe4
b20dda2
b9959bc
eca3464
45a0c3b
4050086
3c1ff88
ec79fd3
fd0d57a
7a25619
fee4a56
0e2ee9b
c1a97c0
a2da43b
d7c18a8
105231c
7a390ea
d5581c8
454d67b
878822d
4844e9b
ff458a2
b42254b
b5e581c
9566b3a
6a3584c
e3b9d9c
2afa564
aa06a2c
4ae4edd
ac57556
9c3d918
804dffa
dce76ae
467483c
f1265ff
64bd7df
bbd1b34
64ac8f2
2e24b08
bc4fb35
5813501
df910bb
11a89f5
d9f1f31
ee6e5a1
5c3c681
925d062
fb80354
76ce335
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I can see, all the microservices that are able to send requests should have
microservice-sa
(e.g.demo-cpg
does not send anything so service account for it is not required(?))Moreover, it seems that orchestrator and demo role bindings should also reference
microservice
cluster roleThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idea was, that communication between some microservices can still be secure without security, because we were planning to account only for not trusted executed tools and their network activity could be restricted with a
NetworkPolicy
on agent pods. This way using SA token for authentication is only required for microservices which receive requests from agents. But then, microservices that send requests to these services also need to authenticate, so it may be easier to unify everything.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I can see, many things have been done:
KubernetesAuthenticaitonUtils
provide almost everything forX-Service-Account-Token
check. So the question is: what hasn't been done yet? (regarding this PR) Seems that ktor needs to be able to add custom headers. And it seems that someBean
s are required (e.g.KubernetesClient
bean inKubernetesAuthenticationUtils
). Am I right?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose it was already more or less working. This PR affects only services, not agents, and I'm not sure if we have ktor on server-side. But yes, the part that validates token against k8s api server requires
KubernetesClient
. The part that adds it as a custom header requires the token to be mounted (added to YAML spec asprojected volume
)