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

[BUG] BSS container race condition with docker compose #31

Closed
njones-lanl opened this issue May 6, 2024 · 6 comments
Closed

[BUG] BSS container race condition with docker compose #31

njones-lanl opened this issue May 6, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@njones-lanl
Copy link

Describe the bug
BSS seems to not have a good ready state for docker compose while using JWT authentication with hydra. It seems to mark ready when the bss binary is running, not when it's gotten its first token and is ready to serve requests.

To Reproduce
Steps to reproduce the behavior:
Run the quickstart compose.

Expected behavior
I'd expect a different readyness endpoint maybe for when the service is ready to serve requests vs when it's running?

@njones-lanl njones-lanl added the bug Something isn't working label May 6, 2024
@davidallendj
Copy link
Contributor

Looks like the router is initialized before the JWKS fetch. https://github.com/davidallendj/bss/blob/main/cmd/boot-script-service/main.go#L451
I just pushed a fix changing the order and changing how the JWKS is verified using the jwtauth library and about to open a PR.

@alexlovelltroy
Copy link
Member

The code change seems to help, but it also appears to trigger a build error. https://github.com/OpenCHAMI/bss/actions/runs/8983805918

I think it doesn't like the capitalization on the import. OpenCHAMI/jwtauth/v5 might need to be converted to openchami/jwtauth/v5

@davidallendj
Copy link
Contributor

davidallendj commented May 7, 2024

That's odd since SMD has the same import.
https://github.com/OpenCHAMI/smd/blob/main/cmd/smd/routers.go#L31

It looks like the builds for SMD were failing for a different reason as well.
https://github.com/OpenCHAMI/smd/actions/runs/8383461156

@alexlovelltroy
Copy link
Member

Yeah. I wasn't sure of the reason. SMD appears to build and upload, but can't seem to attest. It looks like bss fails to build.

@davidallendj
Copy link
Contributor

I opened a PR to update the go.sum and go.mod files which may fix the issue with PR #33.

@synackd
Copy link
Collaborator

synackd commented Aug 8, 2024

I have not observed this during my testing on multiple clusters since the merge of the #33 above. I'm going to close this issue as resolved. If this is still an issue, we can revisit it.

@synackd synackd closed this as completed Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants