Skip to content

hacking: plugin authentication#7

Open
klihub wants to merge 216 commits into
mainfrom
hacking/plugin-authentication
Open

hacking: plugin authentication#7
klihub wants to merge 216 commits into
mainfrom
hacking/plugin-authentication

Conversation

@klihub

@klihub klihub commented Sep 4, 2025

Copy link
Copy Markdown
Owner

No description provided.

Iceber and others added 30 commits June 7, 2024 17:12
Signed-off-by: Iceber Gu <caiwei95@hotmail.com>
Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
plugins/template: fix a typo in a comment.
plugins/device-injector: fix a small typo in README.md.
stop closed plugins that will be removed
Signed-off-by: Yang Yang <yang8518296@163.com>
In some scenarios such as runtime restart or the occurrence of
nri request timeout, the ttrpc connections between the plugin
and the runtime will be actively closed by the runtime, even the
underlying network connection will be closed together. After this,
the plugin must need to re-register to the adaptation side, but now
the stub object cannot be reused for this; if the running plugin
wants to reconnect to the runtime, the only way is to create a new
stub for the plugin.

This commit has split the lifecycle of the stub and the ttrpc
connection to better support the development of the external type
of plugins. The plugin developer can build stub once and use it to
connect to adaptation side many times, just need re-call Start()
function.

Signed-off-by: Lei Liu <liulei.pt@bytedance.com>
Signed-off-by: Jitang Lei <leijitang@outlook.com>
Add support for native CDI injection. With this in place, a
plugin can now directly request injection of CDI devices by
device name. This is much simpler than first performing CDI
device resolution and injection, followed by a set of low-
level NRI adjustments for devices, mounts, env. vars. and
OCI hooks to effectively do the same.

Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
Add support for injecting annotated CDI devices using the
new native NRI CDI injection API.

Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
Co-authored-by: Mike Brown <brownwm@us.ibm.com>
Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
Clarify order of preference for the possible annotations.

Co-authored-by: Mike Brown <brownwm@us.ibm.com>
Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
api: add support for NRI-native CDI injection
Signed-off-by: Xiaojin Zhang <874478410@qq.com>
Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
Add support for adjusting OOM score adjustment.
Signed-off-by: Xiaojin Zhang <874478410@qq.com>
Co-authored-by: Mike Brown <brownwm@us.ibm.com>
Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
Reset source path of api.pb.go to pkg/api/api.proto
Add .codespellrc, fix reported existing spelling errors.

Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
…lure

adaptation: close plugin if initial synchronization fails.
When a container mount is removed without replacing it
by another mount to the same destination, NRI needs to
pass the deletion to the runtime among the adjustments.
Otherwise the mount will not get removed.

Co-authored-by: Krisztian Litkey <krisztian.litkey@intel.com>
Signed-off-by: jingtao.liang <jingtao.liang@easystack.cn>
marquiz and others added 3 commits August 29, 2025 19:55
Disable:

  QF1008: could remove embedded field "Generator" from selector

Signed-off-by: Markus Lehtonen <markus.lehtonen@intel.com>
…ositives

golangci: disable QF1008 from staticcheck linter
@klihub klihub force-pushed the hacking/plugin-authentication branch from 4304210 to fa2c739 Compare September 5, 2025 12:08
Signed-off-by: Markus Lehtonen <markus.lehtonen@intel.com>
@klihub klihub force-pushed the hacking/plugin-authentication branch 11 times, most recently from 9b1d916 to b1acc61 Compare September 10, 2025 06:57
…ustomize

contrib: add example for enabling per-container RDT monitoring
Neither assume that we have a single proto definition
nor hardcode proto file locations for post-processing
actions based on such an assumption.

Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
Add a service and protocol for challenge-response authentication.
Define an interface for authentication implementations. Implement
a default authentication, mostly based on the ideas described in
containerd#152, the proposal for
plugin authentication. Add examples/keygen.go for generating key
pairs for this default implementation.

Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
Add optional authentication-related information to the list
of plugin instances for validation. This should allow finer-
grained validation including loser or stricter restrictions
for authenticated vs. unauthenticated plugins.

Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
Add a new option for acquiring a public/private key pair from
an external source for authenticating with the runtime. Using
this option implicitly enables plugin authentication prior to
registration.

Also add a new environment variable to read keys from files.
Together with bind-mounted secrets, this should provide enough
plumbing to enable transparent authentication of containerized
plugins.

Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
Add support for plugin authentication. Authenticating a plugin
associates it with a role. A role has a unique name and it can
have an optional set of associated tags. These tags are opaque,
carrying no semantic meaning for authentication or NRI itself.

However, tags can have associated semantics during validation
and authorize plugins to perform otherwise restricted actions.
This is the primary intended usage for tags: allow validators
to associate rights with tags instead of role names.

Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
Implement role based overrides for authenticated plugins. This
allows setting a restrictive default configuration and override
it with more liberal configuration for some plugins/roles.

Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
@klihub klihub force-pushed the hacking/plugin-authentication branch 2 times, most recently from c7f97fc to 99fec92 Compare September 10, 2025 19:39
Update documentation for plugin authentication and validation.

Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
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.