HPE OneView
1819805 Members
3048 Online
109607 Solutions
New Discussion юеВ

How to set access rights to OneView REST API

 
BjoernG
Occasional Visitor

How to set access rights to OneView REST API

Hi,

My OneView-user account has the role "Infrastructure administrator".

if I try to access HPE OneView REST API via browser or Terraform provider "oneview", the following error occurs:

https://hponeview/rest/server-hardware
-->

BROWSER:
{"errorCode":"AUTHORIZATION_MISSING_AUTH_HEADER","message":"Authorization error: Missing 'auth' header.","details":"Missing 'auth' header from the request.","recommendedActions":["Please provide the missing 'auth' header value and try again."],"errorSource":null,"nestedErrors":[],"data":{}}

TERRAFORM:
тФВ Error: Error in response: Forbidden
тФВ Response Status: 403 Forbidden
тФВ Response Details: You are not allowed to access the requested resource.
тФВ
тФВ with provider["registry.terraform.io/hewlettpackard/oneview"],
тФВ on main.tf line 31, in provider "oneview":
тФВ 31: provider "oneview" {

Could someone provide me with a working CURL command line, so I can verify my user profile access rights ?
What access settings are needed for the REST API in OneView ?

Regards and thanks in advance.

5 REPLIES 5
support_s
System Recommended

Query: How to set access rights to OneView REST API

System recommended content:

1. HP OneView REST API Reference

 

If the above information is helpful, then please click on "Thumbs Up/Kudo" icon.

 

Thank you for being a HPE community member.


Accept or Kudo

BjoernG
Occasional Visitor

Re: Query: How to set access rights to OneView REST API

Thanks, but I still have read this document.
Is the REST API accessible only via port 37441 ?

Probably I have an firewall issue here.

Thanks.

ChrisLynch
HPE Pro

Re: Query: How to set access rights to OneView REST API

Thanks, but I still have read this document.
Is the REST API accessible only via port 37441 ?

Probably I have an firewall issue here.

No.  The REST API is part of the HTTPS web service.  You cannot access it directly with your web browser unless you are using a browser plugin like Postman.

Have you defined the authentication appropriately in your runbook configuration for the Terraform provider?  You need to follow the instructions here on how to configure what appliance and what your credentials should be.  The credentials can be whatever you use to provide in the login page of the UI.  You cannot just use the OneView Terraform provider directly without first following the instructions I provided.

For further help here using the Terraform provider, I would suggest you use the project's GitHub Issue Tracker.  That is unless you are will-code-for-pizza, and have already asked the question there.

I work at HPE
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo
BjoernG
Occasional Visitor

Re: Query: How to set access rights to OneView REST API

Hi Chris, thanks for the fast reply.

I always thought - as mentioned in 

GitHub /437#issuecomment-977628555 

that I was aware of all needed variables.
Probably we should contine discussing on Github.

Many thanks!

BjoernG
Occasional Visitor

Re: Query: How to set access rights to OneView REST API

Solved:
I struggled with a proxy-setting problem.
Terraform ignores the 'no_proxy' env variable and the 'access denied' message was sent by proxy.



Many thanks!