cli: Add multi org support for issuing certs, add testing

This commit is contained in:
2026-06-05 06:23:12 +00:00
parent f002f4e495
commit 05589ce442
3 changed files with 659 additions and 2 deletions
+4 -2
View File
@@ -668,11 +668,13 @@ if __name__ == "__main__":
parser.add_argument("--remove-key", nargs='?', const='', metavar='KEY_ID', help="Remove an SSH key from your profile. Omit KEY_ID to pick interactively.")
parser.add_argument("--list-keys", action='store_true', default=False, help="List SSH keys in your profile")
parser.add_argument("--install-known-hosts", action='store_true', default=False, help="Fetch Host CA public key and install into ~/.ssh/known_hosts")
parser.add_argument("--list-orgs", action='store_true', default=False, help="List your organizations")
parser.add_argument("--org-id", type=str, help="Organization ID for cert signing (required when a member of multiple orgs)")
args = parser.parse_args()
if not (args.check_cert or args.request_cert or args.add_key or args.clear_cache
or args.remove_key is not None or args.list_keys or args.install_known_hosts):
parser.error("At least one of --check-cert, --request-cert, --add-key, --list-keys, --remove-key, --clear-cache, or --install-known-hosts must be provided.")
or args.remove_key is not None or args.list_keys or args.install_known_hosts or args.list_orgs):
parser.error("At least one of --check-cert, --request-cert, --add-key, --list-keys, --remove-key, --clear-cache, --list-orgs, or --install-known-hosts must be provided.")
# Retrieve SSH key from environment variables if not provided via CLI