Conversation
8222c00 to
0d5b655
Compare
|
I didn't try to incorporate the new tokensmith middleware yet. |
synackd
left a comment
There was a problem hiding this comment.
Initial code review. Still need to build and run it. Unit tests pass.
|
I am running into an error with A couple of suggestions:
|
|
Getting the following error trying to add a boot config: |
I wonder if we're better off just removing this make target and Dockerfile.standalone in favor of a completely different process for making local docker containers for testing. As you mention in your comment, addressing all of the possible ways this might be used outside the release process is challenging. Let's save that for outside the context of the PR though. I have created #8 to further discuss what to do so it doesn't get lost. |
I believe this will be fixed with the updated changes to the PR in main.go |
| LastUpdated string `json:"lastUpdated,omitempty"` | ||
| AppliedTo []string `json:"appliedTo,omitempty"` | ||
| Error string `json:"error,omitempty"` | ||
| } |
| import ( | ||
| "fmt" | ||
|
|
||
| v1 "github.com/openchami/boot-service/apis/boot.openchami.io/v1" |
There was a problem hiding this comment.
I see that the v1 prefix is deleted above, probably should delete it here as well.
|
Interestingly, it complains that the |
Sounds good! |
|
I've added the features from #3 to this PR to simplify the merge train |
… versions Step status: The assistant executed only Step 2 of the approved OpenCHAMI migration plan for `boot-service`: update module definitions and Fabrica generation source inputs, without regeneratin… Signed-off-by: Alex Lovell-Troy <alovelltroy@lanl.gov> Signed-off-by: David Allen <davidallendj@gmail.com>
Step status: The assistant was instructed to execute only Step 3 of the approved `boot-service` Fabrica migration plan: **regenerate artifacts and normalize generated outputs**, while preservi… Signed-off-by: Alex Lovell-Troy <alovelltroy@lanl.gov> Signed-off-by: David Allen <davidallendj@gmail.com>
… behavior Step status: The conversation covered **Step 4** of the approved migration plan for `repos/boot-service`: **repair integration points while preserving legacy compatibility** after Step 3 had n… Signed-off-by: Alex Lovell-Troy <alovelltroy@lanl.gov> Signed-off-by: David Allen <davidallendj@gmail.com>
Step status: The conversation executed **Step 5/7** of the approved OpenCHAMI migration plan for `repos/boot-service`: **“Reconcile tests and add targeted compatibility coverage.”** The goal w… Signed-off-by: Alex Lovell-Troy <alovelltroy@lanl.gov> Signed-off-by: David Allen <davidallendj@gmail.com>
Step status: The conversation executed **Step 6/7** of the approved OpenCHAMI migration plan for `repos/boot-service`: **“Run CI-equivalent validation from a clean state.”** The assistant was… Signed-off-by: Alex Lovell-Troy <alovelltroy@lanl.gov> Signed-off-by: David Allen <davidallendj@gmail.com>
Step status: The conversation executed **Step 7/7** of the approved OpenCHAMI migration plan for `repos/boot-service`: **“Update documentation and prepare final migration summary.”** The assis… Signed-off-by: Alex Lovell-Troy <alovelltroy@lanl.gov> Signed-off-by: David Allen <davidallendj@gmail.com>
- Updated generated models to use new `fabrica` metadata and API definitions. - Refactored requests for BMC, BootConfiguration, and Node to align with new API structure. - Removed legacy resource definitions for BMC, BootConfiguration, and Node. - Updated integration services to utilize new API models and methods. - Adjusted boot script generation and handling to accommodate new resource structures. - Enhanced legacy handler compatibility with updated BootConfiguration and Node models. - Cleaned up documentation and migration plans to reflect changes in resource management. Signed-off-by: Alex Lovell-Troy <alovelltroy@lanl.gov> Signed-off-by: David Allen <davidallendj@gmail.com>
Signed-off-by: Alex Lovell-Troy <alovelltroy@lanl.gov> Signed-off-by: David Allen <davidallendj@gmail.com>
- Added a new `test-integration` target in the Makefile to run integration tests with a configurable timeout. - Updated test commands to include a timeout for unit tests. - Enhanced the `TestBootLogicWithExistingData` integration test to automatically start and stop a local boot-service instance. - Introduced helper functions for starting the test server and seeding integration data. - Updated generated files to reflect the new versioning and timestamps. - Added a new `register_generated.go` file to register resources with the generator. - Improved comments and documentation for clarity. Signed-off-by: Alex Lovell-Troy <alovelltroy@lanl.gov> Signed-off-by: David Allen <davidallendj@gmail.com>
Signed-off-by: Alex Lovell-Troy <alovelltroy@lanl.gov> Signed-off-by: David Allen <davidallendj@gmail.com>
… update README for clarity Signed-off-by: Alex Lovell-Troy <alovelltroy@lanl.gov> Signed-off-by: David Allen <davidallendj@gmail.com>
- Introduced `authz_classifier.go` for customizable request classification. - Added `authz_classifier_generated.go` for default classifier implementation. - Updated `main.go` to include new TokenSmith configuration options. - Enhanced HSM client to support service token management with TokenSmith. - Implemented `ServiceTokenManager` for handling token exchanges and auto-refresh. - Updated configuration examples and documentation for new TokenSmith features. - Added tests for HSM client and service token manager functionalities. Signed-off-by: Alex Lovell-Troy <alovelltroy@lanl.gov> Signed-off-by: David Allen <davidallendj@gmail.com>
Signed-off-by: Alex Lovell-Troy <alovelltroy@lanl.gov> Signed-off-by: David Allen <davidallendj@gmail.com>
Signed-off-by: Alex Lovell-Troy <alovelltroy@lanl.gov> Signed-off-by: David Allen <davidallendj@gmail.com>
- Updated `boot_script_demo.go` to accept an optional profile argument for boot script generation. - Introduced `profile-requests.sh` to demonstrate various boot script requests with different profiles. - Added `profiles.yaml` containing example boot configurations for different profiles. - Modified `GenerateBootScript` method in `BootScriptController` to handle profile selection. - Implemented logic to fall back to the default profile if the requested profile is not found. - Added unit tests for profile selection and fallback behavior in `controller_profile_test.go`. - Updated integration tests to validate profile handling in `integration_existing_test.go`. - Enhanced legacy handler to support profile query parameter in boot script requests. - Created tests for legacy handler to ensure correct profile handling in `handlers_test.go`. Signed-off-by: Alex Lovell-Troy <alovelltroy@lanl.gov> Signed-off-by: David Allen <davidallendj@gmail.com>
…enarios Signed-off-by: Alex Lovell-Troy <alovelltroy@lanl.gov> Signed-off-by: David Allen <davidallendj@gmail.com>
…onfigurations Signed-off-by: Alex Lovell-Troy <alovelltroy@lanl.gov> Signed-off-by: David Allen <davidallendj@gmail.com>
…e token manager integration Signed-off-by: Alex Lovell-Troy <alovelltroy@lanl.gov> Signed-off-by: David Allen <davidallendj@gmail.com>
…eware Signed-off-by: Alex Lovell-Troy <alovelltroy@lanl.gov> Signed-off-by: David Allen <davidallendj@gmail.com>
Signed-off-by: David Allen <davidallendj@gmail.com>
59fee84 to
beabcc5
Compare
Signed-off-by: Alex Lovell-Troy <alovelltroy@lanl.gov>
…g example Signed-off-by: Alex Lovell-Troy <alovelltroy@lanl.gov>
Signed-off-by: Alex Lovell-Troy <alovelltroy@lanl.gov>
Signed-off-by: Alex Lovell-Troy <alovelltroy@lanl.gov>
Signed-off-by: Alex Lovell-Troy <alovelltroy@lanl.gov>
…te attest action Signed-off-by: Alex Lovell-Troy <alovelltroy@lanl.gov>
…kward compatibility for scopes Signed-off-by: Alex Lovell-Troy <alovelltroy@lanl.gov>
Signed-off-by: Alex Lovell-Troy <alovelltroy@lanl.gov>
Description
This pull request migrates the project’s resource definitions to a new structure under
apis/boot.openchami.io/v1, updates the code generation and validation pipeline, and deprecates the oldpkg/resourcestree. It introduces new Fabrica configuration files, updates documentation and Makefile workflows, and refactors generated handlers and client code to use the new API types. The most important changes are grouped below.Resource API migration and deprecation:
BMC,BootConfiguration, andNodeinapis/boot.openchami.io/v1/, replacing the oldpkg/resourcesstructure. These types now use a flat Fabrica-compatible schema with explicitAPIVersion,Kind, andMetadatafields, and implement custom validation logic.pkg/resources/*tree for resource definitions; all new code should use the newapis/boot.openchami.io/v1/location.Fabrica 0.4.0 integration and configuration:
Added
.fabrica.yamlandapis.yamlto define the project’s Fabrica code generation settings and resource groups, enabling strict validation, file-based storage, and generation of handlers, storage, client, and OpenAPI artifacts.Updated documentation (
README.md) to describe the new Fabrica source inputs and regeneration workflow.Build and code quality enforcement:
Updated the
Makefileto reflect the new binary name, and added acheck-no-pkg-resources-importstarget to prevent new code from importing deprecatedpkg/resourcesmodules.Generated handlers and client refactoring:
cmd/server/bmc_handlers_generated.go) to use the newv1API types, update metadata handling, and improve validation layering. Also updated comments to reflect new versioning and codegen practices.Checklist
make test(or equivalent) locally and all tests passgit commit -s) with my real name and email<filename>.licensesidecarLICENSES/directoryType of Change
For more info, see Contributing Guidelines.