HPE Synergy
1833762 Members
2521 Online
110063 Solutions
New Discussion

Re: Query: HPE synergy terminate user session

 
daliborazure
Frequent Advisor

HPE synergy terminate user session

HI

 

I was looking for a way to terminate user session if it is not active for example for 30 minutes. No instructions found on HPE just wondering if someone did this right now it will terminate session if it is longer than 24 hours which is little bit too long

12 REPLIES 12
GM_M
HPE Pro

Re: HPE synergy terminate user session

Hi daliborazure,

Could you please mention which session you are reffering to. If its regarding OneView session or any other.

Thanks and Regards,
Manoj



I work at HPE
HPE Support Center offers support for your HPE services and products when and how you need it. Get started with HPE Support Center today.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo
daliborazure
Frequent Advisor

Re: HPE synergy terminate user session

Hi

 

Yes I am referring to Oneview session for exampe in vCenter I can say if user is not active for 10 minutes terminate the sessionin vCenter I am trying to do the same thing in Oneview as I dont want session to stay open if user is not activey doing something

GM_M
HPE Pro

Re: HPE synergy terminate user session

Hi daliborazure

Thank you for the clarification, you can setup a session timeout for OneView using the REST API commands. I have attached a link with the detailed procedure explaining how to configure a session. Hope this helps.

Thanks and Regards,
Manoj.



I work at HPE
HPE Support Center offers support for your HPE services and products when and how you need it. Get started with HPE Support Center today.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo
support_s
System Recommended

Query: HPE synergy terminate user session

Hello,

 

Let us know if you were able to resolve the issue.

 

If you have no further query, and you are satisfied with the answer then kindly mark the topic as Solved so that it is helpful for all community members.

 

Please click on "Thumbs Up/Kudo" icon to give a "Kudo".

 

Thank you for being a HPE valuable community member.


Accept or Kudo

daliborazure
Frequent Advisor

Re: HPE synergy terminate user session

how to access and change do I need to use some programming language it says put what programming language is used to change this

daliborazure
Frequent Advisor

Re: Query: HPE synergy terminate user session

no i couldnt change it as it requires some programming language they just leave code but what programming language it is used to do this

GM_M
HPE Pro

Re: Query: HPE synergy terminate user session

Hi  daliborazure

This is a REST API commands which can be runned on any API Tool like postman. You can use this link for watching a video on how to use REST API commands.

Thanks and Regards,
Manoj



I work at HPE
HPE Support Center offers support for your HPE services and products when and how you need it. Get started with HPE Support Center today.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo
daliborazure
Frequent Advisor

Re: Query: HPE synergy terminate user session

when i try postman it says

 

{"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":{}}

 

there is option for user name and password but it asks for header and as I have said I am not developer so I dont know what it means

 

 

GM_M
HPE Pro

Re: Query: HPE synergy terminate user session

Hi daliborazure 

You are getting this error as there is no auth token being generated.
Please run the First command which is provided in this link as it gives you a Auth token in the response. Before clicking on SEND please check that you have selected Body, option raw and JSON format and input the following 
{
"authLoginDomain":"mydirectory",
"password":"mypassword",
"userName":"administrator",
"loginMsgAck": true
}

** Please enter your user name in place of administrator and your password for mypaasword

And under headers section give key value pairs as 
X-Api-Version: 4600
Content-Type: application/json

Doing this you will be able to generate X- Auth Token. Please take this Auth token and input it in the request which you were running earlier.

Please let me know if you encounter any errors

Thanks and Regards,
Manoj.



I work at HPE
HPE Support Center offers support for your HPE services and products when and how you need it. Get started with HPE Support Center today.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo
Greeshma21
HPE Pro

Re: Query: HPE synergy terminate user session

Hi @daliborazure 

To obtain the authorization token, create a POST request with the following request URL

https://<appliance-IP-address>/rest/login-sessions


Enter the following headers

X-Api-Version
Content-Type

And Enter the JSON Body shown below

{
"authLoginDomain":"<directory-name>",
"password":"<enter-your-password>",
"userName":"<enter-your-username>",
"loginMsgAck": true
}

You can also refer to this video for more infor, it might help.

Regards,
Greeshma

 


I work at HPE
HPE Support Center offers support for your HPE services and products when and how you need it. Get started with HPE Support Center today.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo
daliborazure
Frequent Advisor

Re: Query: HPE synergy terminate user session

Where i would put that. I cannot understand this much as I am not programmer. Hopefully next versions will have nice check box where i can just put minutes and not programming skills to do just this simple taskAPI.png

Greeshma21
HPE Pro

Re: Query: HPE synergy terminate user session

Hi @daliborazure 

Next, you have to enter the headers as follows:
Headers.jpg

X-api-version can be found by running the GET command and URL: https://ip_address/rest/version

After headers, Select the Body, the raw option, and JSON as shown in the below image.
Screenshot 2024-12-17 102255.jpg

Then enter the below commands,

{ 
"authLoginDomain":"<directory-name>", 
"password":"<enter-your-password>", 
"userName":"<enter-your-username>", 
"loginMsgAck": true 
} 

 

Regards,
Greeshma


I work at HPE
HPE Support Center offers support for your HPE services and products when and how you need it. Get started with HPE Support Center today.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo