-
Notifications
You must be signed in to change notification settings - Fork 4
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
Add reverse proxy example #15
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* upstream/main: chore(deps): bump glib-sys from 0.19.5 to 0.19.8 in the default group (#28) chore: Explain more make targets (#27) Add embedded web page example (#14) chore: Group and sort imports (#23) Demonstrate containerized builds (#17) Factor out `app_logging` modules to lib crate (#24) chore(deps): bump the default group with 2 updates (#21) chore(deps): bump thiserror from 1.0.59 to 1.0.60 in the default group (#20) chore(deps): bump the default group with 3 updates (#13)
The web page is meant to facilitate manual testing of the app.
Serving static files on host shortens the feedback cycle since we don't need to deploy anything to a device. The way that static files are located will probably not work in general once support for dynamically generated files is added to the build system, but this example only uses static files, so it should not block that feature.
Because the reverse proxy configuration has no built in support for forwarding the identity that a user is authenticated as or the scopes that the user is authorized for this example tries to work around that by exposing one API for each access policy supported by the ACAP framework. It would be nice to either: 1. Formalize this pattern using some kind of nested service or similar. 2. Get support from the ACAP framework for forwarding information about the authenticated user and it's permissions, e.g. through a header.
Because I don't know of an official way for the web page to figure out what access policy it is authorized for I add an input for selecting it. Attempting to use a more restricted policy than the user is currently authorized for will trigger an authentication challenge. For simplicity the web page always uses the websocket as "anonymous" because this should always work. Compared to using the selected policy this is simpler because the websocket does not have to be closed.
* upstream/main: Generate app `LICENSE` files (#44) Add acap-ssh-utils bin and lib crate (#19) Add cargo-acap-build tool (#25) Remove partially containerized workflow (#42) Improve acap-logging docs (#41) chore: Prepare logging library crate for publishing (#40) feat: Add metadata broker wrapper and example (#22) Rename environment variables controlling the Makefile (#26) Adopt dev container as primary environment (#39) Make the `build` verb build for only one target (#31) chore(deps): bump ghcr.io/devcontainers/features/common-utils (#38) chore(deps): bump log from 0.4.21 to 0.4.22 in the default group (#37) Add dev container (#36) Add link to acap-rs-app-template in `README.md` (#34) Document `python3-venv` dependency (#35) fix: Repair `Makefile` (#32)
In `about.toml`: - Add BSD-3-Clause to the list of accepted licenses because it is one of two licenses used by `matchit` which in turn is used by `axum`. Add it below MIT because I have a feeling that MIT is generally considered the most permissive licence. Add it above Unicode-DFS-2016 because that text is longer and harder to understand. All licenses in the list can already be found in firmware indicating they may be acceptable to include in other software as well.
* upstream/main: feat: Add vapix bindings and example (#33)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds a simple example of a web server exposed through the tcp reverse proxy configuration in the acap manifest.
To Do:
Consider including an UDS exampleThis code is messy, more difficult to run on host, and it is not clear to me that it should be preferred.Consider adding unit tests. I don't want to spend time figuring out how to do this right now.