-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: [WD-16894] Add bulk deletion and group modification of TLS Users (
#1008) ## Done - [✔] Allow selection of tls identities in the permission- > identity list - [✔] Use the new DELETE 1.0/auth/identities/tls/:id endpoint for the bulk delete - [✔] Unhide “delete” and “modify groups” button for tls users of the new type in the identities list - [✔] Modify bulk actions "delete" and "modify groups" on the identity list page to also allow inclusion of tls users - [✔] Legacy TLS users should be disabled, not deleted. ## QA 1. Run the LXD-UI: - On the demo server via the link posted by @webteam-app below. This is only available for PRs created by collaborators of the repo. Ask @mas-who or @edlerd for access. - With a local copy of this branch, [build and run as described in the docs](../CONTRIBUTING.md#setting-up-for-development). 2. Perform the following QA steps: **Create "new" TLS Fine grained identities** - To add a new TLS Identity Client (Pending) please follow the steps for creating a pending fine-grained TLS identity in the '[Authenticate with the LXD server](https://documentation.ubuntu.com/lxd/en/latest/howto/server_expose/#authenticate-with-the-lxd-server)' section of the LXD documentation. - Be sure to use the API instructions to create pending fine grained identities, as the CLI instructions require a remote to be specified. - Be sure to authenticate the client by following the instructions through step 2. **Delete TLS Users** - Navigate to the Permissions > Identities - Attempt to delete individual TLS Client (Pending) identities using the inline delete identity button. - Attempt to delete bulk TLS Client (Pending) identities. - Verify that Legacy TLS identities (Client Certificate (Unrestricted) identities) cannot be selected via the checkbox or modified/deleted via inline buttons. **Add TLS users users to a group** - Navigate to Permissions > Groups - Create a new group and add permissions to the group. - Navigate to the Permissions > Identities - Attempt to add an individual TLS identity to a group using the inline modify groups button. - Attempt to add several TLS identities (Pending) to a group. **Test TLS user permissions / Login as a TLS User** - Concatenate the .key and .crt files to create a .pem file using the following command: - ```cat <KEY-FILE> <CRT-FILE> > <PEM-FILE-NAME>.pem ``` - Change lines 11 and 22 of the _haproxy-dev.cfg_ file to the following, respectively. - ``` bind 0.0.0.0:8407 ssl verify optional crt <PEM-FILE-PATH> ca-file <CRT-FILE-PATH> ``` - ``` server lxd_https LXD_UI_BACKEND_IP:8443 ssl verify none crt <PEM-FILE-PATH> ``` - TLS Fine grained identities have been tested with the following permissions: ![image](https://github.com/user-attachments/assets/5b361b91-5b01-4b7c-9fa2-1b87c66acf48) ## Screenshots ![image](https://github.com/user-attachments/assets/7c28d019-5e13-41e2-8df7-16f008317c61)
- Loading branch information
Showing
11 changed files
with
93 additions
and
52 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { FC } from "react"; | ||
import { LxdIdentity } from "types/permissions"; | ||
import ResourceLabel from "./ResourceLabel"; | ||
|
||
interface Props { | ||
identity: LxdIdentity; | ||
truncate?: boolean; | ||
} | ||
|
||
const IdentityResource: FC<Props> = ({ identity, truncate }) => { | ||
const identityIconType = | ||
identity.authentication_method == "tls" ? "certificate" : "oidc-identity"; | ||
|
||
return ( | ||
<ResourceLabel | ||
type={identityIconType} | ||
value={identity.type} | ||
truncate={truncate} | ||
/> | ||
); | ||
}; | ||
export default IdentityResource; |
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
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
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
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
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
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
Oops, something went wrong.