OpenCHAMI / bss

MIT License
1 stars 2 forks source link

Changed router to go-chi and added authentication middleware #17

Closed davidallendj closed 4 months ago

davidallendj commented 5 months ago

This PR adds similar authentication middleware to BSS like SMD using go-chi. Authentication can be enabled by using the --require-auth flag, and requires that a URL be set to fetch the JWKS from the issuer using the --jwks-url flag. This PR addresses #16.

synackd commented 4 months ago

Alright, just need to test and we can get this approved.

synackd commented 4 months ago

Tests are passing besides the above.

There is a separate issue I found while writing tests where GETing a boot script for a nonexistent XName/NID/MAC will cause a nil pointer error to arise when using Postgres instead of key-value storage. This is because the code is still expecting KV in other places and it needs to be fixed but it's irrelevant for this PR.

synackd commented 4 months ago

LGTM.