Added Native and Automatic HTTPS support to Rest, fixes #280#284
Added Native and Automatic HTTPS support to Rest, fixes #280#284
Conversation
| services.push( | ||
| await resolveService(n, { | ||
| container_name: n.name, | ||
| // user, // TODO fix the user permissions issue |
There was a problem hiding this comment.
Does the user need Sudo to clean up the target folder? Are sudo files stored in the HTTP proxy volumen?
There was a problem hiding this comment.
Not I'm afraid, I think it's because of the 's6-overlay' that the https-portal docker file is using. Couldn't find a decent solution yet but will continue to research; I think that docker file needs to do the setup with root user and then use a less privileged user. We might end up extending that docker file and keeping a less privileged user.
There was a problem hiding this comment.
what if we don't use volumes and SSL cert is reevaluated on restart? not great but may solve the sudo issue?
You can create the empty volumen folder too, which solves some of the issues
There was a problem hiding this comment.
We might end up extending that docker file and keeping a less privileged user. - probably, but given lack of user above, I'm guessing this should be solved sooner rather than later (read: prior to merging to main)
There was a problem hiding this comment.
I removed the user and the volume parts from ComposeService. The container will hold the certificates produced unless there is an image upgrade which doesn't happen frequently, so we are safe from the produced file permissions issues. There will be another PR for the symbol-bootstrap stop command improvement (which will prevent containers to be removed when stopped).
| symbolFaucetImage: symbolplatform/symbol-faucet:1.0.1-alpha | ||
| symbolAgentImage: symbolplatform/symbol-node-rewards-agent:2.0.0 | ||
| mongoImage: mongo:4.4.3-bionic | ||
| httpsPortalImage: steveltn/https-portal:1 |
There was a problem hiding this comment.
we would need an alpha rest eventually to test the native implementation
There was a problem hiding this comment.
Yes, I'm currently working on the catapult-rest part.
There was a problem hiding this comment.
e4c412e to
801a401
Compare
| votingKeyDesiredLifetime: 360 | ||
| votingKeyDesiredFutureLifetime: 60 | ||
| lastKnownNetworkEpoch: 255 | ||
| lastKnownNetworkEpoch: 271 |
There was a problem hiding this comment.
how is this related to this change?
There was a problem hiding this comment.
It's an automatic unit test that patches these epochs. The idea is that when a user creates a new voting node, the voting file starts from the most current epoch (in offline mode, in online mode bootstrap queries the network). We can probably disable that unit tests and revert that change. Then manually update that value in other PRs.
|
@yilmazbahadir @Wayonb @gimer , I have drafted how the community can eventually upgrade the nodes to HTTPs using Bootstrap. Please have an initial look so then @segfaultxavi can do his magic |
Yeah, ping me when you're done reviewing... and when you give me access to the file :) |
|
Moved to syndicate HackMD https://hackmd.io/Cx1KQCOxRaaHrNNwuNI7CQ?view |
| services.push( | ||
| await resolveService(n, { | ||
| container_name: n.name, | ||
| // user, // TODO fix the user permissions issue |
There was a problem hiding this comment.
what if we don't use volumes and SSL cert is reevaluated on restart? not great but may solve the sudo issue?
You can create the empty volumen folder too, which solves some of the issues
|
I just realized that my comments were pending for the last 2 weeks. I just submitted the comments. Sorry for the confusion guys. |
9a7ebd7 to
2b1519a
Compare
fixed typo and unit test. improved package.json scripts
Removed httpProxy param from gateway, the httpProxies array can handle it.
Added native ssl unit compose unit test
…shared.yml as they are optional and bumped docker compose version in tests
…tal image version Currently https-portal only works with the root user but this wouldn't be an issue since we don't mount any volumes any more. symbolbootstrap stop command will actually stop containers and run command will start, unless there is a version upgrade(which will trigger a new container creation) it wouldn't need to re-sign the certificates. So most of the time it will be reusing the same certificates.
2b1519a to
417a0fa
Compare
e90b154 to
4c7364c
Compare
|
Kudos, SonarCloud Quality Gate passed!
|








Fixes #280
gateways[].httpsProxy(true|number)which will integrate Https-Portal into the docker-compose.yml file duringcompose, default inbound port will be 3001