-
Notifications
You must be signed in to change notification settings - Fork 930
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
Convert the certificates
table into an identities
table.
#12807
Conversation
Test failures immediately 😢 I will ping everyone again when I've got the tests to pass. |
35be9d4
to
b349292
Compare
@tomponline @roosterfish @MusicDin @gabrielmougard Tests passing so ready for review :) PS: I did run the tests not long before submitting the PR. Then I made a couple of changes thinking they were just cosmetic and everything blew up! |
443703f
to
553727d
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.
Looking good, just one suggestion.
a3c320d
to
5f202de
Compare
5f202de
to
3e3b1e9
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.
Thanks for the schema update test!
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.
Overall this looks great, my main concern is the auth_type column as it seems to be redundant in place of filtering by (in some cases combinations) of identity type.
Signed-off-by: Mark Laing <mark.laing@canonical.com>
Signed-off-by: Mark Laing <mark.laing@canonical.com>
Signed-off-by: Mark Laing <mark.laing@canonical.com>
Signed-off-by: Mark Laing <mark.laing@canonical.com>
Signed-off-by: Mark Laing <mark.laing@canonical.com>
It is useful to refactor certificate methods rather than deleting and using identity methods for the following reasons: - The node database still contains a 'certificates' table and the Certificate type is used to represent those certificates. - It leaves handlers for the certificate API unadulterated and easier to reason about. Signed-off-by: Mark Laing <mark.laing@canonical.com>
Signed-off-by: Mark Laing <mark.laing@canonical.com>
Signed-off-by: Mark Laing <mark.laing@canonical.com>
Signed-off-by: Mark Laing <mark.laing@canonical.com>
It is no longer possible to create a certificate without a type. Signed-off-by: Mark Laing <mark.laing@canonical.com>
3e3b1e9
to
8e16476
Compare
@markylaing just want to check you've tested this upgrade procedure on a real cluster, because TLS certs are used for trusted intra-cluster comms and want to ensure this isn't going to cause an issue when upgrading clusters. |
I admit that I have not... I will do so now. It would be ideal if we could write a test for this somehow. Maybe the clustering tests could accept a different LXD binary to use for other members (or one could be compiled from the main branch). |
We have https://github.com/canonical/lxd-ci/blob/main/tests/cluster which could be extended to check auth. |
Ah nice, thanks |
@tomponline upgrades working fine in a cluster. They of course need to be upgraded at the same time as the schema is different. After the upgrade I am able to move instances around and target particular members. |
In preparation for the addition of the identity and access managment APIs, this PR replaces the
certificates
table with anidentities
table. There are no changes to the/1.0/certificates
API itself.