Skip to content

Identity Plugin - #288

Open
atpugtihsrah wants to merge 10 commits into
containerd:mainfrom
atpugtihsrah:identity-plugin-5qjelc65nb
Open

atpugtihsrah wants to merge 10 commits into
containerd:mainfrom
atpugtihsrah:identity-plugin-5qjelc65nb

Conversation

@atpugtihsrah

@atpugtihsrah atpugtihsrah commented Apr 24, 2026 •

Copy link
Copy Markdown

Identity Plugin WIP

RFC PR: #245

Relates to #240

PR Assisted by IBM Bob.

@atpugtihsrah atpugtihsrah mentioned this pull request Apr 24, 2026
@MikeZappa87

Copy link
Copy Markdown
Member

@atpugtihsrah this is interesting. I did some work in the istio/isovalent ecosystem for SPIRE. Lmk if you need any help

@atpugtihsrah
atpugtihsrah force-pushed the identity-plugin-5qjelc65nb branch from 11f5595 to ff81182 Compare May 21, 2026 14:48
@atpugtihsrah
atpugtihsrah force-pushed the identity-plugin-5qjelc65nb branch 2 times, most recently from 0748a95 to e355b5e Compare July 12, 2026 06:44
@mikebrow

Copy link
Copy Markdown
Member
Ginkgo detected a version mismatch between the Ginkgo CLI and the version of Ginkgo imported by your packages:
  Ginkgo CLI Version:
    2.28.1
  Mismatched package versions found:
    2.19.1 used by identity-injector

  Ginkgo will continue to attempt to run but you may see errors (including flag
  parsing errors) and should either update your go.mod or your version of the
  Ginkgo CLI to match.

  To install the matching version of the CLI run
    go install github.com/onsi/ginkgo/v2/ginkgo
  from a path that contains a go.mod file.  Alternatively you can use
    go run github.com/onsi/ginkgo/v2/ginkgo
  from a path that contains a go.mod file to invoke the matching version of the
  Ginkgo CLI.

  If you are attempting to test multiple packages that each have a different
  version of the Ginkgo library with a single Ginkgo CLI that is currently
  unsupported.

Comment thread plugins/identity-injector/go.mod Resolved
@atpugtihsrah
atpugtihsrah force-pushed the identity-plugin-5qjelc65nb branch 10 times, most recently from 7b49520 to ec86027 Compare July 16, 2026 09:26
@atpugtihsrah
atpugtihsrah marked this pull request as ready for review July 16, 2026 09:29
@mikebrow

mikebrow commented Jul 20, 2026 •

Copy link
Copy Markdown
Member

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.

Comment thread plugins/identity-injector/setup.md Resolved
Comment thread plugins/identity-injector/setup.md Resolved
@atpugtihsrah
atpugtihsrah force-pushed the identity-plugin-5qjelc65nb branch 2 times, most recently from cadcd8d to c3a1707 Compare July 31, 2026 08:31
@mikebrow

Copy link
Copy Markdown
Member

heads up needs rebase :-) we've been busy getting ready for a release

@atpugtihsrah
atpugtihsrah force-pushed the identity-plugin-5qjelc65nb branch 2 times, most recently from b46ddf1 to 3358c45 Compare August 25, 2026 15:13
@mikebrow

mikebrow commented Sep 1, 2026

Copy link
Copy Markdown
Member

Ran the test instructions to success using kind...

We can add this later:
mikebrow@76915f1

@mikebrow mikebrow left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM very nice...

would like to get this in and iterate

@mikebrow
mikebrow requested a balanced review from Copilot September 1, 2026 21:22

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 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 Recv error 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

Comment thread Makefile Resolved
Comment thread plugins/identity-injector/setup.md Resolved
@atpugtihsrah
atpugtihsrah force-pushed the identity-plugin-5qjelc65nb branch 3 times, most recently from c004c91 to 534b9f2 Compare September 9, 2026 06:18
@atpugtihsrah
atpugtihsrah force-pushed the identity-plugin-5qjelc65nb branch 4 times, most recently from dc014be to d900cde Compare September 25, 2026 10:43
@atpugtihsrah
atpugtihsrah force-pushed the identity-plugin-5qjelc65nb branch 3 times, most recently from 8317efd to 26690f4 Compare October 19, 2026 07:10
@mikebrow

mikebrow commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

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?

@atpugtihsrah
atpugtihsrah force-pushed the identity-plugin-5qjelc65nb branch 2 times, most recently from 479af88 to 22ef98a Compare October 26, 2026 11:44
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>
Signed-off-by: Harshit Gupta <hg2t4e@gmail.com>
@atpugtihsrah
atpugtihsrah force-pushed the identity-plugin-5qjelc65nb branch from fa10b77 to 7ecadbd Compare November 22, 2026 13:35
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>
@atpugtihsrah

Copy link
Copy Markdown
Author

@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?

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Filename collisions can overwrite the certificate with a private key while retaining world-readable permissions, exposing credentials.

7 open issues
12 resolved since last review

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 {
Comment on lines +255 to +267
// 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)
Comment on lines +545 to +546
p.watchersMu.Lock()
p.watchers[watcherKey] = &containerWatcher{
Bytes: privateKey,
}

return os.WriteFile(file, pem.EncodeToMemory(b), 0600)
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.

4 participants