AccessKey Management

AccessKey is the security credential for authorizing third-party users to call the ZStack ZSphere API to access virtualization resources. It includes the AccessKey ID and the AccessKey Secret, which must be kept strictly confidential.

Relationship Between AccessKey Administrator and User Permissions

  • Administrators can create multiple AccessKeys, while regular users can create up to two AccessKeys.
  • Administrators can delete AccessKeys created by regular users.
  • An AccessKey has full permissions of its creator.

Generating an AccessKey

You can follow these steps to generate an AccessKey:

  1. Navigate to Menu > System Management > AccessKey Management.
  2. Click Create AccessKey.

Using AccessKey with Third-Party Platform SDK to Call APIs

SDK Method

To create a virtual machine using an AccessKey, you need to provide the accessKeyId and accessKeySecret when making the API call.
  • Java SDK
    CreateVmInstanceAction action = new CreateVmInstanceAction(); action.name = "vm1"; action.instanceOfferingUuid = "ae97ced44efc3314b8f7798972b4ba1a"; action.imageUuid = "da119f7906513eccabf271991c35a65e"; action.l3NetworkUuids = asList("cc0e4c5e77df3af68e59668e7f9e06c5"); action.dataDiskOfferingUuids = asList("19d22d051b063d379a2816daaf431838 ","905d94a6abb5398fa1995f6398e3f6fc"); action.clusterUuid = "a0468dc645223f67bd0f2ab95276bbae"; action.description = "this is a vm"; action.strategy = "InstantStart"; action.accessKeyId = "Fnxc7KIQAdGTvXfx8OjC"; action.accessKeySecret = "Do0AJUGVPrT9iJZlc1QOtk7kzEusYidyqJxSmKOb"; CreateVmInstanceAction.Result res = action.call();
  • Python SDK
    CreateVmInstanceAction action = CreateVmInstanceAction() action.name = "vm1" action.instanceOfferingUuid = "ae97ced44efc3314b8f7798972b4ba1a" action.imageUuid = "da119f7906513eccabf271991c35a65e" action.l3NetworkUuids = [cc0e4c5e77df3af68e59668e7f9e06c5] action.dataDiskOfferingUuids = [19d22d051b063d379a2816daaf431838, 905d94a 6abb5398fa1995f6398e3f6fc] action.clusterUuid = "a0468dc645223f67bd0f2ab95276bbae" action.description = "this is a vm" action.strategy = "InstantStart" action.accessKeyId = "Fnxc7KIQAdGTvXfx8OjC" action.accessKeySecret = "Do0AJUGVPrT9iJZlc1QOtk7kzEusYidyqJxSmKOb" CreateVmInstanceAction.Result res = action.call()

Calling RESTful APIs

  1. Create an AccessKey
    CreateAccessKey accountUuid=dff4fb9bbff14e97a67ab894c7b8c528 userUuid=dff4fb9 bbff14e97a67ab894c7b8c528 {  "inventory": {  "AccessKeyID": "N3Tf05yXZUmSjCf6mYIB",  "AccessKeySecret": "XAlrsYvswmnEV3X1KWNs1WfZHD6aBIIphmI0rX9S",  "accountUuid": "dff4fb9bbff14e97a67ab894c7b8c528",  "createDate": "Sep 7, 2023 1:50:06 PM",  "lastOpDate": "Sep 7, 2023 1:50:06 PM",  "userUuid": "dff4fb9bbff14e97a67ab894c7b8c528",  "uuid": "ae353717ca7b4182bb87fb5d010235e8"  },  "success": true }
  2. Generate date
    python get_time.py Thu, 07 Sep 2023 13:54:10 PRC
    import datetime import time date = time.time() #EEE, dd MMM yyyy HH:mm:ss z str = datetime.datetime.fromtimestamp(date).strftime('%a, %d %b %Y %H:%M:%S PRC') print str
  3. Generate digest
    # python get_accesskey.py "vvSZpmj4cnB53qUDmm6E" "8heumeFTvIeZxkTGfEYvV i9qVVPd9ffQNDALSPPb" \ "GET" "Fri, 08 Sep 2023 17:58:34 PRC" "/v1/vm-instances" args: Namespace(acesskey_id='vvSZpmj4cnB53qUDmm6E', acesskey_secret ='8heumeFTvIeZxkTGfEYvVi9qVVPd9ffQNDALSPPb', \ date='Fri, 08 Sep 2023 17:58:34 PRC', method='GET', uri='/v1/vm-instances') Signature: hPToRHeHdV49D4u20G8OlE0yJho= Authoration ZStack vvSZpmj4cnB53qUDmm6E:hPToRHeHdV49D4u20G8OlE0yJho=
    #/usr/bin/python import base64 import hmac import sha import argparse from hashlib import sha1 parser = argparse.ArgumentParser(description='calculate zstack access key digit.') parser.add_argument('acesskey_id') parser.add_argument('acesskey_secret') parser.add_argument('method') parser.add_argument('date') parser.add_argument('uri') args = parser.parse_args() print "args: %s" % args h = hmac.new(args.acesskey_secret, args.method + "\n"  + args.date + "\n"  + args.uri, sha1) Signature = base64.b64encode(h.digest()) print "Signature: %s" % Signature print "Authoration %s" % ("ZStack " + args.acesskey_id + ":" + Signature)
  4. Send a request
    curl -H "Authorization:ZStack N3Tf05yXZUmSjCf6mYIB:S3vm7u7/+n +sIQe72lgia08I30U=" \ -H "Content-Type:application/x-www-form-urlencoded" \ -H "Date:Fri, 08 Sep 2023 18:54:10 PRC" \ -X GET http://172.20.11.134:8080/zstack/v1/vm-instances

Manage AccessKey

You can manage generated AccessKeys, including enabling, disabling, and deleting them.
  1. Navigate to Menu > System Management > AccessKey Management.
  2. Select the AccessKey.
    • To enable or disable an AccessKey, click Disable or Enable.
    • If you no longer need to access virtual resources via API, you can delete the AccessKey by clicking Delete.

Console Proxy Management

The console proxy enables logging into the virtual machine console through a proxy address. You can view, reconnect, and modify the console proxy address in ZStack ZSphere.

View Proxy Address

Procedure
  1. Navigate to Menu > System Management > Console Proxy.
  2. View the console proxy address. The default proxy address is the IP address of the management node.

Reconnect Proxy Address

If the virtual machine console fails to open, you need to perform a reconnect operation. After reconnecting, when the status displays as Connected, you can normally open the console. On the Console Proxy page, you can click Reconnect to perform the reconnect operation.

Modify Proxy Address

If you need to set the console proxy address, you can do so on the Console Proxy page by clicking Modify Proxy Address. This allows you to modify the address and port as needed. For the console proxy address, you can enter the public IP address of the management node, a NAT address, or a domain name. The changes take effect immediately after modification, without requiring a restart of the management node.


SNMP Management
















Archives

Download Document Archives

Back to Top

Download

Already filled the basic info?Click here.

Enter at least 2 characters.
Invalid mobile number.
Enter at least 4 characters.
Invalid email address.
Wrong code. Try again. Send Code Resend Code (60s)

An email with a verification code will be sent to you. Make sure the address you provided is valid and correct.

同意 不同意

I have read and concur with the Site TermsPrivacy PolicyRules and Conventions on User Management of ZStack Cloud

Download

Not filled the basic info yet? Click here.

Invalid email address or mobile number.
同意 不同意

I have read and concur with the Site TermsPrivacy PolicyRules and Conventions on User Management of ZStack Cloud

Email Us

contact@zstack.io
ZStack Training and Certification
Enter at least 2 characters.
Invalid mobile number.
Enter at least 4 characters.
Invalid email address.
Wrong code. Try again. Send Code Resend Code (60s)

同意 不同意

I have read and concur with the Site TermsPrivacy PolicyRules and Conventions on User Management of ZStack Cloud

Email Us

contact@zstack.io
Request Trial
Enter at least 2 characters.
Invalid mobile number.
Enter at least 4 characters.
Invalid email address.
Wrong code. Try again. Send Code Resend Code (60s)

同意 不同意

I have read and concur with the Site TermsPrivacy PolicyRules and Conventions on User Management of ZStack Cloud

Email Us

contact@zstack.io

The download link is sent to your email address.

If you don't see it, check your spam folder, subscription folder, or AD folder. After receiving the email, click the URL to download the documentation.

The download link is sent to your email address.

If you don't see it, check your spam folder, subscription folder, or AD folder.
Or click on the URL below. (For Internet Explorer, right-click the URL and save it.)

Thank you for using ZStack products and services.

Submit successfully.

We'll connect soon.

Thank you for using ZStack products and services.