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

Adapt httpboot plugin to respond with client specific UKIs #155

Merged
merged 4 commits into from
Jun 17, 2024

Conversation

hardikdr
Copy link
Member

@hardikdr hardikdr commented Jun 6, 2024

Proposed Changes

# For static behavior, same UKI for all requests:
- httpboot: <StaticURL>

# For dynamic behavior with bootservice:
- httpboot: bootservice:<BootServiceURL>

Fixes #

@hardikdr
Copy link
Member Author

hardikdr commented Jun 6, 2024

cc @damyan @5kt

ukiURL, err = fetchUKIURL(bootFile6, clientIPs)
if err != nil {
log.Errorf("failed to fetch UKI URL: %v", err)
return resp, true
Copy link
Contributor

Choose a reason for hiding this comment

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

Same

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

clientIPs, err := extractClientIP6(req)
if err != nil {
log.Errorf("failed to extract ClientIP, Error: %v Request: %v ", err, req)
return resp, true
Copy link
Contributor

Choose a reason for hiding this comment

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

Change to false, so if your plugin fails for whatever reason, the plugin chain will not break (meaning: the next plugin in the configuration will get executed)

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks, I fixed it.

plugins/httpboot/plugin.go Outdated Show resolved Hide resolved
@damyan damyan enabled auto-merge (squash) June 17, 2024 10:45
@damyan damyan merged commit e611122 into main Jun 17, 2024
8 checks passed
@damyan damyan deleted the feat/custom-uki-httpboot branch June 17, 2024 10:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants