-
-
Notifications
You must be signed in to change notification settings - Fork 360
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
Remove the need for outbound internet connection from Oathkeeper #234
Comments
This is currently not easy implementable because of the way JSON Schema works. The schema within Oathkeeper is built into the binary, however, that schema relies on other schemas to work by using the |
An option here would be to use a tool like https://github.com/APIDevTools/json-schema-ref-parser at build time to deref the schemas |
In my use case, the servers where this would be deployed are in isolated networks with no internet access at all. But even if internet is available, if githubusercontent.com was ever offline, nobody would be able to start Oathkeeper, right? |
We will try to figure something out. For now, as a workaround, is a cache proxy reasonable? on top of a modified /etc/hosts file? We could probably dereference the json schema as part of the build process and include it in the binary to fix this for real. |
@aeneasr Thanks for your willingness to look into it! I'm willing to help with the code if I can; any pointers would be helpful. I'm just starting to evaluate Oathkeeper now, so I don't necessarily need a workaround yet. I guess you mean serve up that file from e.g. localhost and point raw.githubusercontent.com at there using /etc/hosts? That seems reasonable as a temporary solution. |
Exactly! |
Now that I think of it some more, I'm not sure about the workaround, because it's https, so I think you'd have to generate and trust a local certificate for raw.githubusercontent.com. @aeneasr It looks like oathkeeper is using "packr" to embed What do you think? I'm not that familiar with Go, so I'm not clear on how packr would work with a library (also, ory/x seems to be on packr v1, while oathkeeper is using packr v2). |
Yes absolutely, I think the idea to get this working would be to have a build pipeline that:
Should be straight forward but I didn't have time yet to properly test it out. |
Resolves several documentation issues, see also: ory/docs#217 Closes #234 Closes #281
Is your feature request related to a problem? Please describe.
Oathkeeper without internet access doesn't function due to needing to pull a schema from github at runtime.
time="2019-08-08T15:03:53Z" level=fatal msg="The configuration is invalid and could not be loaded." error="Get https://raw.githubusercontent.com/ory/x/master/.schemas/logrusx/viper.schema.json: dial tcp 151.101.200.133:443: i/o timeout"
Describe the solution you'd like
ability to provide schema via config or build into the container
Describe alternatives you've considered
outbound proxy. does not seem like this is a good enough case for it though.
Additional context
The text was updated successfully, but these errors were encountered: