-
Notifications
You must be signed in to change notification settings - Fork 44
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 explicit trust establishment #383
Conversation
e61b196
to
5d17236
Compare
f59031a
to
719e37f
Compare
Added some changes as I also made a mistake whilst rebasing #358. As the remote token creation/deletion always happens after the MicroCloud's microcluster is formed, we neither need a secret nor a custom certificate as we can already use full mTLS. |
e60811f
to
d34ebe5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is awesome, and intuitive to follow, nice job @roosterfish! :)
I mostly have nits to report, primarily structuring of the messages that are printed to the user.
Couple things that stand out:
-
During a snap mismatch, the error seems incorrect now because the multicast lookup behaviour is different:
Error: Failed to read join confirmation: Failed to send join intent: Skipping peer "micro01" due to missing services (MicroOVN)
-
During preseed, it seems we require
listen_address
to be set, but that defeats the purpose of multicast lookup -
the
--add
flag for preseedseems redundantcan be improved -
The biggest one (but also not a blocker) is the behaviour if a joiner's session ends. On the initiator there's no feedback, so as you are flipping through your joiners and typing the password, if one of them dies in the background, by the time you get back to the initiator and confirm the systems in the table, you have no way of knowing that a problem occurred, and the initiation fails. It would be nice if we could have a column for "session status" in the table so that we know when a joiner has closed its session, and can work around it. I don't believe our current table package allows for easy updates though, so we can deal with this later.
89d9fb8
to
0d67d00
Compare
9a68cc8
to
d492049
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a handful of more nits, and some validation suggestions :)
cmd/microcloud/session.go
Outdated
if !c.autoSetup && target == "" { | ||
fmt.Println("Searching an eligible system ...") | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be "Searching for an eligible system ..." right?
Also maybe s/system/initiator/
?
d492049
to
61ed5e4
Compare
61ed5e4
to
cba3052
Compare
829fe4c
to
136a328
Compare
This PR adds another `QueryRaw` function to the client which allows accessing the raw `*http.Response`. That is required for the canonical/microcloud#383 in order to access the remotes certificate used in the TLS connection. Furthermore the parsing of API responses is moved into the public facing package to allow any user of `QueryRaw` to both access the raw response and parsing it as usual.
136a328
to
f481bc9
Compare
Signed-off-by: Julian Pelizäus <[email protected]>
Signed-off-by: Julian Pelizäus <[email protected]>
Signed-off-by: Julian Pelizäus <[email protected]>
Signed-off-by: Julian Pelizäus <[email protected]>
83c339f
to
c544123
Compare
@masnax preseed test succeeded after resolving the conflict, so I would carefully say it's ready for review again :) The test run before showed green for all jobs. |
Signed-off-by: Julian Pelizäus <[email protected]>
Signed-off-by: Julian Pelizäus <[email protected]>
Signed-off-by: Julian Pelizäus <[email protected]>
Signed-off-by: Julian Pelizäus <[email protected]>
Signed-off-by: Julian Pelizäus <[email protected]>
This new func allows extracting the passphrase from the stdout of 'microcloud init' and running multiple 'microcloud join' using this passphrase in interactive mode. Signed-off-by: Julian Pelizäus <[email protected]>
Signed-off-by: Julian Pelizäus <[email protected]>
Signed-off-by: Julian Pelizäus <[email protected]>
Signed-off-by: Julian Pelizäus <[email protected]>
Signed-off-by: Julian Pelizäus <[email protected]>
Also move the join message out of waitForJoin to not indicate a join if not all of the peers clusters are joined. Signed-off-by: Julian Pelizäus <[email protected]>
This ensures the mDNS multicast traffic flowing between the nodes isn't interrupted as this behavior was observed on the GitHub runners. Signed-off-by: Julian Pelizäus <[email protected]>
c544123
to
46fd760
Compare
Did another small push as I saw a slice was initialized with the wrong capacity which caused this output during preseed:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than that 1 nit, this looks great! Thanks for the hard work @roosterfish!
|
||
# capture_and_join: extracts the passphrase from stdin and outputs text that is being passed to `TEST_CONSOLE=1 microcloud join` | ||
# to simulate terminal input to the interactive CLI. | ||
# Set the first argument to either true or false if you want to skip missing services. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I take it we removed the missing services question from microcloud join
, so this description is misleading now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah good catch, fixed with #416.
I figured the README requires some more clarification after merging #383 as you also have to run `microcloud join` on all the other machines if you don't want to setup MicroCloud on a single machine. In addition this also gives the hint that you can now have a MicroCloud using a single machine.
This PR adds the explicit trust establishment to MicroCloud according to the spec in https://discourse.ubuntu.com/t/explicit-trust-establishment-mechanism-for-microcloud/44261.
The PR adds the EFF wordlist with over 1300 lines so please consider this for the review.
The license information is based on https://www.eff.org/copyright.
It has the following dependencies which have to be met before it can be marked as ready:
In addition we are currently waiting on MicroCeph to merge the
v2
of MicroCluster which is also are requirement for this PR.Open TODO's:
go.mod
file if the dependencies are metv2