Shopping cart

Subtotal:

$0.00

HPE0-G05 Explain the role and function of Authentication, HPE Morpheus Enterprise Software CLI, HPE Morpheus Enterprise Software API overview, Access tokens, and Header, body, and response codes

Explain the role and function of Authentication, HPE Morpheus Enterprise Software CLI, HPE Morpheus Enterprise Software API overview, Access tokens, and Header, body, and response codes

Detailed list of HPE0-G05 knowledge points

Explain the role and function of Authentication, HPE Morpheus Enterprise Software CLI, HPE Morpheus Enterprise Software API overview, Access tokens, and Header, body, and response codes Detailed Explanation

Authentication

1. Types of authentication in Morpheus

When you “log in” to Morpheus (UI, CLI, or API), you are authenticating – proving who you are.
Morpheus supports several ways to do this:

  • Local Morpheus users

  • External directory / SSO (LDAP / AD, SAML, etc.)

  • API / CLI authentication (tokens)

Let’s go through them one by one.

Local Morpheus users
  • These are user accounts created directly inside Morpheus.

  • Username and password are stored in the Morpheus system (with proper hashing).

  • Typical for:

    • Lab environments

    • Small teams

    • Initial setup

  • You log in with:

    • Username (e.g. admin, john.doe)

    • Password

Think of this like a normal local account on any web application.

External directory / SSO

Instead of managing users inside Morpheus, many enterprises prefer to use a central identity provider.
Morpheus can integrate with:

  • LDAP / Active Directory

    • Users and groups come from AD.

    • Password authentication happens against AD.

    • Easier to manage users and their lifecycle (joiners/leavers).

  • SAML

    • Used for Single Sign-On (SSO).

    • Users log in via an identity provider (IdP) such as Azure AD, Okta, etc.

    • Morpheus trusts the IdP’s assertion that “this person is John Smith”.

  • OAuth / OIDC (depending on environment)

    • More modern token-based SSO mechanisms.

Benefits of external auth:

  • Centralized credential management

  • Password policies managed in one place

  • Users can use the same account for many systems

API / CLI authentication

For API calls and CLI (command-line interface), we usually don’t type username/password every time. Instead, we use access tokens.

  • The token is like a “key card” that represents a user.

  • It is typically sent as a Bearer token in the Authorization header.

  • APIs and CLI tools read the token to know:

    • which user you are

    • which tenant you belong to

    • what permissions you have

You’ll see this format:

Authorization: BEARER <tokenValue>  

Tokens are safer and more convenient for automation than storing raw passwords.

2. Role-based access control (RBAC)

Once Morpheus knows who you are (authentication), it then must decide what you are allowed to do.
This is where RBAC (Role-Based Access Control) comes in.

Tenants and Roles

Every user in Morpheus belongs to:

  • one (or more) Tenant(s)

  • one (or more) Role(s)

  • Tenant = logical organization / customer / business unit.

    • In a service provider scenario, each customer can be a separate tenant.

    • In an enterprise, you might split by department or project.

  • Role = set of permissions, e.g.:

    • “Cloud Admin”

    • “Tenant Admin”

    • “Read-only User”

    • “DevOps Engineer”

What Roles define

Roles control which actions a user can do, for example:

  • View or provision instances

  • Create/modify Workflows / Tasks / Scripts / File Templates

  • Access Cypher secrets

  • Manage clouds (vCenter, AWS, etc.)

  • Manage groups, tenants, users

  • View or modify backups, monitoring, archives, etc.

So even if two users both authenticate successfully, their Roles can be very different:

  • User A: only allowed to provision small VMs in dev

  • User B: can add new clouds, modify Cypher secrets, manage tenants

Authentication vs Authorization (important for exam)
  • Authentication = proving identity

    • “Are you really Alice?”
  • Authorization (RBAC) = what that identity is allowed to do

    • “Alice can create instances in dev, but cannot delete clouds.”

For the exam, remember:

  • Authentication verifies who you are.

  • RBAC defines what you can do after you’re authenticated.

3. Multi-tenancy

Morpheus is multi-tenant, meaning it can safely serve multiple “organizations” or “customers” from a single installation.

What multi-tenancy means
  • A Tenant has:

    • its own users

    • its own clouds (optionally shared clouds too)

    • its own instances, apps, blueprints

    • its own Workflows, Policies, etc.

  • Service providers can host many customers:

    • Tenant A = Customer A

    • Tenant B = Customer B

  • Large enterprises can treat business units or departments as tenants.

Authentication in tenant context

When a user authenticates, Morpheus always considers the tenant:

  • A token is associated with:

    • a user

    • a tenant

  • Permissions and visible resources (instances, clouds, etc.) are evaluated inside that tenant.

So it’s not just “who are you” but also “which tenant are you acting in”.

HPE Morpheus CLI

1. What the CLI is

The CLI (Command-Line Interface) is a tool that talks to the Morpheus API from your terminal or scripts.

Beginner-friendly view:

  • The Web UI = click buttons in a browser

  • The CLI = type commands in a terminal

The CLI is useful for:

  • Scripting / automation

    • Shell scripts, Python scripts, etc., can run CLI commands.
  • CI/CD integration

    • Pipelines (Jenkins, GitLab CI, Azure DevOps, etc.) can use the CLI to:

      • provision environments

      • tear them down

      • update resources

  • Admin operations

    • Power users and admins can manage Morpheus without logging into the UI.

2. Typical capabilities

With the CLI, you can do many of the same things you do through the UI, such as:

  • Login / manage tokens

    • Authenticate once, then reuse token.
  • List / create / update / delete resources:

    • Instances

    • Clouds

    • Groups

    • Workflows

    • Tasks

    • Script Templates

    • File Templates

    • Option lists

    • Inputs

  • Trigger actions:

    • Provisioning (create instances or apps)

    • Backups

    • Scaling operations (scale up/down)

    • Run Workflows

Essentially, the CLI is a friendly wrapper around the API with commands like:

morpheus instances list  
morpheus instances create ...  
morpheus tasks list  

3. Authentication in CLI

Typical flow:

  1. Configure the Morpheus URL

    • e.g. https://morpheus.example.com
  2. Authenticate

    • Use username/password, or

    • Use an existing access token

  3. CLI stores token for that profile

    • So you don’t have to log in again every time.

    • Future commands automatically send the token to Morpheus.

Security recommendation
  • Prefer using tokens instead of storing passwords in scripts.

  • You can:

    • create a token in the UI or via API

    • save it as an environment variable

    • configure the CLI to use that token

This keeps your automation safer and easier to rotate.

HPE Morpheus API Overview

1. Style and basics

The Morpheus API is a RESTful API.

That means:

  • Operations are accessed through URLs (endpoints) like /api/instances, /api/tasks, etc.

  • It uses standard HTTP methods:

    • GET – read data

    • POST – create data or trigger actions

    • PUT / PATCH – update data

    • DELETE – delete data

  • Data is exchanged in JSON format:

    • Request body: JSON

    • Response body: JSON

Structure example:

  • Base URL: https://morpheus.example.com

  • API base path: /api

  • Full endpoint: https://morpheus.example.com/api/instances

2. Example API areas

The Morpheus API exposes many resource types, for example:

  • Authentication / Tokens

    • Endpoints to log in and generate tokens.
  • Instances, Apps, Blueprints

    • Create, list, update, and delete instances.

    • Manage application blueprints and deployments.

  • Clouds, Groups

    • Register VMware, AWS, Azure, etc.

    • Organize resources into groups.

  • Workflows, Tasks, Script Templates, File Templates

    • Manage automation components.
  • Cypher and Archives

    • Manage secrets and file repositories.
  • Monitoring, backups, etc.

    • Retrieve metrics, schedule backups, handle job status.

Everything the UI can do is basically built on top of these API calls.

3. Pagination and filtering

When listing resources (instances, tasks, etc.), the API often returns paged results.

Common query parameters:

  • max – how many items per page

  • offset – how many items to skip (page start)

  • sort – which field to sort by

  • direction – ascending or descending

Also filters:

  • by name

  • by type

  • by tenant ID

  • by status

For automation, this is important because:

  • You may need to loop through multiple pages to see all instances.

  • You can filter data server-side to reduce the amount you need to process.

Access Tokens

1. What access tokens are

An access token is like a digital key card that Morpheus issues to represent:

  • a specific user

  • within a specific tenant

  • with specific roles/permissions

Properties:

  • Can be short-lived or long-lived (depends on configuration).

  • Used instead of passwords for:

    • API calls

    • CLI access

    • Automation scripts

Why tokens?

  • Safer to store than passwords

  • Easy to revoke or rotate

  • Do not require the automation to know actual user passwords

2. Creation and management

Tokens are typically created:

  • In the Morpheus UI, under:

    • user profile

    • API / Access Tokens section

  • Via an API call, when:

    • a user sends their username/password or other auth data

    • Morpheus returns a token

Each token has:

  • An expiration time (if configured)

  • An association with a user and tenant

  • Permissions equal to the user’s roles

If the user’s roles change, the token’s permissions effectively change as well.

3. Usage in clients

To use a token in an API call, you send it in the HTTP header:

Authorization: BEARER <tokenValue>  

The server then:

  • Checks if the token is valid

  • Checks if it’s expired

  • Determines which user and tenant it belongs to

  • Applies RBAC rules to decide if the request is allowed

Good practices
  • Store tokens in a safe place:

    • environment variables

    • secret managers (like Vault, AWS Secrets Manager, etc.)

    • never hard-code tokens in source code

  • Rotate tokens regularly:

    • revoke and reissue when needed

    • especially if you suspect a leak

  • Use least privilege:

    • create dedicated service accounts with limited roles for automation

    • avoid using full admin tokens in scripts

Header, Body, and Response Codes

1. HTTP Headers

Headers are metadata sent along with HTTP requests and responses.

Important headers for Morpheus API:

  • Authorization

    • Authorization: BEARER <token>

    • Used for authentication.

  • Content-Type

    • Content-Type: application/json

    • Tells the server “the body I’m sending is JSON”.

  • Accept

    • Accept: application/json

    • Tells the server “I want JSON back”.

  • Additional headers

    • Could include:

      • pagination info

      • rate limiting hints

      • correlation IDs (for tracing)

For most exam-level understanding, focus on Authorization, Content-Type, and Accept.

2. HTTP Body

The body is the main content of a request or response.

  • For POST, PUT, PATCH:

    • You often send a JSON body describing what you want to create or change.

Example request to create an instance:

{  
  "instance": {  
    "name": "myAppServer",  
    "site": 1,  
    "plan": 5,  
    "cloud": 2  
  }  
}  
  • For GET requests:

    • Usually no body.

    • Filters or options are passed as query parameters in the URL, like:

      • /api/instances?max=25&offset=0&name=myAppServer

3. Response codes (status codes)

HTTP status codes tell you what happened.

Common ones:

2xx – Success
  • 200 OK

    • Request succeeded.

    • Response body usually contains data.

  • 201 Created

    • A new resource has been created.

    • Often returned after POST requests.

  • 204 No Content

    • Request succeeded, but there’s nothing to return in the body.

    • Common after successful DELETE.

4xx – Client errors
  • 400 Bad Request

    • The request is malformed or invalid.

    • Example: missing required fields, wrong JSON format.

  • 401 Unauthorized

    • No valid authentication.

    • Example:

      • no token

      • expired token

      • incorrect credentials

  • 403 Forbidden

    • You are authenticated, but not allowed to perform this action.

    • Example:

      • User can log in, but doesn’t have permission to delete instances.
  • 404 Not Found

    • The resource you’re trying to access doesn’t exist.

    • Example:

      • Instance ID is wrong or already deleted.
5xx – Server errors
  • 500 Internal Server Error

    • Something went wrong on the server side.
  • 503 Service Unavailable

    • Temporary issue, service is unavailable, maybe during maintenance or overload.

For the exam, be comfortable distinguishing:

  • 401 vs 403 vs 404.

4. Response body

The response body usually contains JSON.

  • On success:

    • Contains the resource representation or list.

    • Example: instance details, list of tasks.

  • On error:

    • Contains information like:

      • error message

      • code

      • sometimes hints or details

For automation:

  • Always check the status code.

  • Then parse the JSON body for details or error handling.

Explain the role and function of Authentication, HPE Morpheus Enterprise Software CLI, HPE Morpheus Enterprise Software API overview, Access tokens, and Header, body, and response codes (Additional Content)

1. Authentication

Service accounts for automation

In addition to standard human user accounts, Morpheus allows the use of service accounts for automation tasks. Service accounts are typically assigned:

  • restricted roles

  • long-lived or tightly controlled tokens

  • limited tenant access

Service accounts are preferred for CI/CD pipelines, integration scripts, and any automation where personal user credentials should not be used.

Token permissions follow user roles

Tokens do not embed permissions directly.
Instead:

  • a token inherits the permissions of the user who generated it

  • if the user’s role changes afterward, all previously issued tokens automatically follow the new permissions

  • removing a role effectively restricts what existing tokens can do

This ensures RBAC stays consistent even when tokens are long-lived.

SAML/OIDC in Service Provider (SP) mode

When using SAML or OIDC for Single Sign-On, Morpheus typically functions in Service Provider (SP) mode. In this mode:

  • Morpheus delegates authentication to an external Identity Provider (IdP)

  • the IdP validates the user and returns an assertion to Morpheus

  • Morpheus trusts the assertion and logs the user in

This is important for understanding multi-tenant SSO configurations and common enterprise deployments.

2. Morpheus CLI

Profile management

The CLI supports multiple profiles, enabling users to switch between:

  • production

  • staging

  • lab environments

  • multiple tenants or endpoints

Each profile can store its own URL, token, and user information, allowing automation systems to interact with multiple Morpheus environments easily.

JSON output for automation

Most CLI commands support output in JSON, making them suitable for:

  • CI/CD pipelines

  • parsing with jq or other tools

  • integrating with automation frameworks

This aligns the CLI with scripting-friendly workflows.

CLI error codes mirror API status codes

CLI operations typically return:

  • exit status codes aligned with API response codes

  • error messages generated by API responses

For automation, this creates predictable behavior.
For example:

  • a 401 API error → CLI exits with authentication failure

  • a 404 API error → CLI indicates resource not found

3. Morpheus API

Role permissions required for endpoints

Even with a valid token, API access depends heavily on RBAC. A token must belong to a user with:

  • correct tenant access

  • correct roles for the endpoint

A valid token alone does not guarantee access.

API versions

Morpheus uses versioned API endpoints. Over time:

  • new versions introduce new fields

  • deprecated endpoints may behave differently

  • certain features may only exist in newer API versions

This is relevant for environments upgraded across multiple Morpheus releases.

Optional rate limiting

Some deployments may enforce rate limiting, which:

  • limits how many API calls can be made in a given time

  • returns headers indicating rate status

  • may issue 429 Too Many Requests if exceeded

This is relevant for automation that loops through large datasets.

Bulk operations

Certain endpoints support batch create/update/delete, which improves automation efficiency. Examples include:

  • creating multiple instances

  • updating tags or metadata in bulk

  • performing mass-lifecycle actions

Batch operations reduce the number of API calls required for large-scale workflows.

4. Access Tokens

Token scopes and expiration policies

Depending on system settings, tokens may include:

  • different scopes (limiting which actions the token may perform)

  • expiration values (short-lived or long-lived tokens)

  • refresh rules

These policies are managed by administrators and may vary by tenant.

Tokens cannot be updated

Tokens cannot be modified after creation.
To change a token:

  • revoke the existing token

  • create a new one

This ensures tokens are immutable and reduces security risks.

Token rotation impact

When a token is rotated:

  • CLI sessions using the old token will fail

  • automation scripts must be updated with the new token

  • long-running pipelines may need token-refresh logic

Token management is a common exam scenario related to automation reliability.

Token restrictions

Tokens may be bound to:

  • specific IP ranges

  • session policies

  • corporate security requirements

This is common in regulated industries and may appear in multi-tenant configuration questions.

5. Headers, Body, and Response Codes

Pagination metadata in headers

When listing resources, Morpheus may return pagination metadata in response headers, such as:

  • total item count

  • page size

  • next/previous page markers

Automation must read these headers to iterate through full datasets.

Correlation or request IDs

Responses may include unique correlation IDs used for troubleshooting:

  • helps trace requests through logs

  • useful in large or distributed environments

These IDs may be referenced when engaging support.

PATCH for partial updates

Morpheus supports:

  • PATCH for partial updates (only changed fields)

  • PUT for full object replacement

This distinction is important for API-based integration and incremental configuration management.

202 and 207 responses

Certain operations are asynchronous or multi-step, resulting in:

  • 202 Accepted
    The request has been accepted, but the processing is not complete.

  • 207 Multi-Status
    Different parts of a bulk or multi-sub-operation may succeed or fail individually.

Automations should check follow-up status endpoints after receiving these codes.

Frequently Asked Questions

How do Morpheus API clients authenticate requests using an access token?

Answer:

The client includes the access token in the HTTP Authorization header when making API requests.

Explanation:

Morpheus APIs use token-based authentication. After generating an access token, the client must include it in the HTTP request header so the API server can verify the identity of the requester. The Authorization header typically contains the token string. When the request reaches the Morpheus API, the platform validates the token and determines the user’s permissions before executing the requested operation. If the token is missing, expired, or invalid, the API will reject the request. Token-based authentication is commonly used in automation scripts and CI/CD pipelines because it avoids embedding usernames and passwords in API calls.

Demand Score: 88

Exam Relevance Score: 91

What is the primary purpose of the Morpheus CLI?

Answer:

The CLI provides a command-line interface for interacting with Morpheus services and automating administrative tasks.

Explanation:

The Morpheus CLI allows administrators and developers to manage cloud resources, workflows, and deployments from the command line. Instead of manually interacting with the web interface, users can execute commands to provision instances, query resources, or manage infrastructure. The CLI internally communicates with the Morpheus API, acting as a simplified interface for automation tasks. It is commonly used in scripts and operational tooling where direct API calls would require additional request formatting. For example, a DevOps engineer may use CLI commands in a shell script to deploy instances during CI/CD pipelines.

Demand Score: 76

Exam Relevance Score: 85

What information is typically included in an API request body?

Answer:

The request body contains the data required for the API operation, such as configuration parameters or resource definitions.

Explanation:

When creating or modifying resources through the Morpheus API, the request body includes structured data describing the action to perform. This information is usually formatted in JSON and may include fields such as instance configuration, network settings, or automation parameters. The API server reads this data and executes the requested operation. If required fields are missing or incorrectly formatted, the API may return a client error response. Understanding the request body structure is essential when automating provisioning or infrastructure management tasks using API calls.

Demand Score: 73

Exam Relevance Score: 84

What does an HTTP 401 Unauthorized response indicate when calling the Morpheus API?

Answer:

It indicates that the request failed authentication because valid credentials or tokens were not provided.

Explanation:

A 401 response occurs when the API server cannot verify the identity of the client making the request. In Morpheus environments, this usually happens when the access token is missing, expired, incorrectly formatted, or placed in the wrong header. Automation scripts must ensure that tokens are included correctly in the Authorization header. Another possible cause is that the token was generated for a different tenant or user context. Debugging typically involves verifying token validity and checking the authentication headers sent with the request.

Demand Score: 84

Exam Relevance Score: 89

What is the main difference between using the Morpheus CLI and calling the API directly?

Answer:

The CLI provides a simplified command interface that internally communicates with the API.

Explanation:

Both CLI commands and direct API calls ultimately interact with the same Morpheus backend services. However, the CLI abstracts the complexity of HTTP requests, authentication headers, and JSON formatting. Instead of constructing API calls manually, users execute predefined commands that automatically generate the necessary requests. Direct API usage offers greater flexibility for custom automation or integration with external systems, while the CLI is typically preferred for scripting or operational management tasks.

Demand Score: 77

Exam Relevance Score: 86

Why are HTTP response codes important when working with Morpheus APIs?

Answer:

Response codes indicate whether the API request succeeded or failed and help identify the cause of errors.

Explanation:

Every Morpheus API request returns an HTTP status code that reflects the result of the operation. Successful operations typically return codes in the 200 range, indicating the request was processed correctly. Client errors (400 series) indicate issues with the request itself, such as missing parameters or authentication failures. Server errors (500 series) indicate problems on the server side. When automating infrastructure operations through APIs, scripts often rely on response codes to determine whether the next step should execute or whether error handling should occur.

Demand Score: 81

Exam Relevance Score: 88

HPE0-G05 Training Course