Repository navigation
Identity Plugin - #288
Identity Plugin#288atpugtihsrah wants to merge 10 commits into
Conversation
|
@atpugtihsrah this is interesting. I did some work in the istio/isovalent ecosystem for SPIRE. Lmk if you need any help |
11f5595 to
ff81182
Compare
0748a95 to
e355b5e
Compare
|
7b49520 to
ec86027
Compare
|
good meeting this morning @atpugtihsrah! Note to other reviewers contributor is going to clean up the vendor issues and boost the plugin getting started guide. |
cadcd8d to
c3a1707
Compare
|
heads up needs rebase :-) we've been busy getting ready for a release |
b46ddf1 to
3358c45
Compare
|
Ran the test instructions to success using kind... We can add this later: |
mikebrow
left a comment
There was a problem hiding this comment.
LGTM very nice...
would like to get this in and iterate
There was a problem hiding this comment.
🟡 Changes recommended
Request-lifetime cancellation, unsafe filename handling, startup races, and missing recovery paths currently prevent reliable and secure identity delivery.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
Suppressed comments (1)
plugins/identity-injector/identity-injector.go:372
- The bundle stream has the same permanent-failure path: any transient
Recverror returns, cancels the shared context, and stops SVID rotation too. Re-establish this subscription with bounded backoff while the container watcher remains active.
resp, err := stream.Recv()
if err != nil {
log.Errorf("%s: bundle stream error: %v", containerName(pod, ctr), err)
return
- Files reviewed: 8/9 changed files
- Comments generated: 9
- Review effort level: Balanced
c004c91 to
534b9f2
Compare
dc014be to
d900cde
Compare
8317efd to
26690f4
Compare
|
See #288 (comment) let's discuss :) Also see Antonio's PR here #329.. more than likely we can address your timeout issue with that pr? |
479af88 to
22ef98a
Compare
Signed-off-by: Harshit Gupta <hg2t4e@gmail.com>
…arting Signed-off-by: Harshit Gupta <hg2t4e@gmail.com>
Signed-off-by: Harshit Gupta <hg2t4e@gmail.com>
Signed-off-by: Harshit Gupta <hg2t4e@gmail.com>
Signed-off-by: Harshit Gupta <hg2t4e@gmail.com>
fa10b77 to
7ecadbd
Compare
Signed-off-by: Harshit Gupta <hg2t4e@gmail.com>
Signed-off-by: Harshit Gupta <hg2t4e@gmail.com>
Signed-off-by: Harshit Gupta <hg2t4e@gmail.com>
|
@mikebrow I addressed the timeout - now using the request context instead of using a separate 30 second timeout. I also now use the fail policy to fail the nri request in case the request times out. Could you please let Copilot run on the PR again? |
There was a problem hiding this comment.
🟡 Changes recommended
Filename collisions can overwrite the certificate with a private key while retaining world-readable permissions, exposing credentials.
7 open issues
Reject colliding certificate, key, and bundle filenames · New Avoid blocking synchronization on every background rebuild · New Skip unconfigured containers before validating PID · New Guard cleanup against deleting a replacement watcher · New Do not publish watchers that have already been cancelled · New Make injected keys readable by workload users · New If the annotation key is present but the value is empty/whitespace,yaml.Unmarshalwill succeed…
12 resolved since last review
These filenames come directly from pod annotations but are never constrained to base names. A value…ctxis request-scoped:pkg/adaptation/plugin.go:807-808cancels it as soon as the… This returns after merely launching goroutines, before either stream has received and written its… Go'sflagpackage treats a bare boolean flag as true without consuming the next argument.… Watcher state exists only in memory, but this plugin does not implement NRI'sSynchronize… The configuredspiffe_idis only compared against the first returned SVID. A PID can match… A transientRecvfailure permanently ends the SVID watcher; its deferred cancellation also kills… The test target is wired in, but the new plugin is absent from thePLUGINSlist at… The instructions usechmod 777on directories that hold identity material (SPIRE server DB,… The instructions usechmod 777on directories that hold identity material (SPIRE server DB,… New logic is introduced for streaming watchers and update processing (processSvidUpdate,… This overlay does not contain the stated NRI registration ConfigMap or any RBAC resources: its…
Review effort: Balanced
| config.BundleFileName = defaultBundleFileName | ||
| } | ||
|
|
||
| for _, filename := range []string{config.CertFileName, config.KeyFileName, config.BundleFileName} { |
| continue | ||
| } | ||
|
|
||
| if err := p.injectIdentity(ctx, pod, ctr); err != nil { |
| // Check container PID | ||
| if container.Pid == 0 { | ||
| return fmt.Errorf("%s container PID not available", containerName(pod, container)) | ||
| } | ||
|
|
||
| config, err := parseIdentityConfig(container.Name, pod.Annotations) | ||
| if err != nil { | ||
| return err | ||
| } | ||
|
|
||
| if config == nil { | ||
| return nil | ||
| } |
| wg.Wait() | ||
| close(done) | ||
| p.watchersMu.Lock() | ||
| delete(p.watchers, watcherKey) |
| p.watchersMu.Lock() | ||
| p.watchers[watcherKey] = &containerWatcher{ |
| Bytes: privateKey, | ||
| } | ||
|
|
||
| return os.WriteFile(file, pem.EncodeToMemory(b), 0600) |



Identity Plugin WIP
RFC PR: #245
Relates to #240
PR Assisted by IBM Bob.