メインコンテンツまでスキップ

API呼び出しの実行中に「Invalid session id received」というエラーメッセージが表示される

Views:
4
Visibility:
Public
Votes:
0
Category:
fabric-interconnect-and-management-switches
Specialty:
brocade<a>2009962823</a>
Last Updated:

環境

  • Brocade
  • サンナビ

問題

  • セッションIDの生成後ログインAPI呼び出しを使用して、生成されたセッションIDを使用して後続のAPI呼び出しが実行されますが、 Invalid session id received エラーメッセージがスローされます。 

[root@xxxxxxxx ~]# curl -k -H 'username: ' -H 'password: ' -H 'Content-Type: application/json' -X POST https://10.225.xx.xx/external-api/v1/login/
{"sessionId":"4a84bce3-b086-4df6-b209-fbff6a54bb55"}[root@xxxxxxxx ~]#
[root@xxxxxxxx ~]#
[root@xxxxxxxx ~]# curl -vv -k -H 'Authorization: 4a84bce3-b086-4df6-b209-fbff6a54bb55' -H 'Accept: application/json' -H 'Content-Type: application/json' -X GET https://10.225.xx.xx/external-api/v1/discovery/fabrics
Note: Unnecessary use of -X or --request, GET is already inferred.
*   Trying 10.225.xx.xx...
* TCP_NODELAY set
* Connected to 10.225.xx.xx (10.225.xx.xx) port 443 (#0)
* ALPN, offering h2

.

.

.
* Connection #0 to host 10.225.xx.xx left intact
{"code":401,"errorMessage":"UnAuthorizedException","detailedErrorMessage":"Invalid authorization token in the request: {\"ResponseCode\":\"AUTHENTICATION_2017\",\"ResponseId\":\"authentication.sessionvalidation.invalidsessionid\",\"ResponseMessage\":\"Invalid session id received\"}"}
 
 

  • セッションIDは、初回ログインを実行したホストIPアドレスに関連付けられます。 HTTPSプロキシが使用されている場合、IPアドレスが変更され、セッションIDが無効と表示されることがあります。 ただし、ホストはHTTPSにプロキシを使用していません。
  • SANnavログには、IPアドレスへの参照が1つしかありません。
    authentication-rbac-mw - [INFO ] 2024-04-01 16:45:07.665 [http-nio-12009-exec-3] com.brocade.dcm.authentication.server.controller.AuthenticationController - Login Request from client : 10.1.xx.xx with isGlobal flag: [null]
    authentication-rbac-mw - [INFO ] 2024-04-01 16:45:07.727 [http-nio-12009-exec-3] com.brocade.dcm.authentication.server.controller.AuthenticationController - Authentication successful and sessionId is e947f2c3-d66e-4c01-8655-cd05f129d9e0 for user ROuser, client 10.1.xx.xx
    10.1.42.81 - - [01/Apr/2024:16:45:07 +0530] "POST /external-api/v1/login/ HTTP/2.0" 200 52 "-""curl/7.61.1"

 

  • この日付のセッションIDがわかっている場合は、以降のRESTコマンドで引き続き使用するか、 ログアウトすることができます。
  • RESTは、 [1]セッションIDを使用しないセッションレスモードでも使用できます。
  • セッションレス認証も試行しましたが  、で認証に失敗しました invalid username and password error。  ただし、GUIコンソールで同じクレデンシャルを使用しても問題はありません。

 

すべてのテストログインが同じように失敗します。

2024-04-23 16:29:51 curl -k -H 'Authorization: Basic ' -H 'Accept: application/json' -H 'Content-Type: application/json' -X GET https://10.225.xx.xx/external-api/v1/discovery/fabrics

SANnavアクセスログ:

10.1.xx.xx - ROuser [23/Apr/2024:16:29:51 +0530] "GET /external-api/v1/discovery/fabrics HTTP/2.0" 401 148 "-""curl/7.61.1"

SANnav認証ログ:

authentication-rbac-mw - [INFO ] 2024-04-23 16:29:51.550 [http-nio-12009-exec-17] com.brocade.dcm.authentication.server.controller.AuthenticationController - Login Request from client : 10.1.xx.xx with isGlobal flag: [null]
authentication-rbac-mw - [INFO ] 2024-04-23 16:29:51.558 [http-nio-12009-exec-17] com.brocade.dcm.authentication.server.controller.AuthenticationController -  Maximum session limit: 25, current session count: 8, current sessionLess count: 0 and  totalSessionCount: 8
authentication-rbac-mw - [INFO ] 2024-04-23 16:29:51.558 [http-nio-12009-exec-17] com.brocade.dcm.authentication.server.shiro.DCMRealmAuthenticator - Primary authentication setting is Local Database and secondary authentication setting is None
authentication-rbac-mw - [INFO ] 2024-04-23 16:29:51.565 [http-nio-12009-exec-17] com.brocade.dcm.authentication.server.shiro.LocalDbRealm - Authentication status after verifying using MD5 encryption false
authentication-rbac-mw - [INFO ] 2024-04-23 16:29:51.572 [http-nio-12009-exec-17] com.brocade.dcm.authentication.server.shiro.DCMRealmAuthenticator - Done with primary authentication. Auth status: false, fallback status: 0
authentication-rbac-mw - [INFO ] 2024-04-23 16:29:51.572 [http-nio-12009-exec-17] com.brocade.dcm.authentication.server.shiro.DCMRealmAuthenticator - Falling back to local authentication false .....?
authentication-rbac-mw - [INFO ] 2024-04-23 16:29:51.572 [http-nio-12009-exec-17] com.brocade.dcm.authentication.server.shiro.DCMRealmAuthenticator - Login status for user ROuser after authentication and user role check: false Is locally Authenticated false
authentication-rbac-mw - [INFO ] 2024-04-23 16:29:51.572 [http-nio-12009-exec-17] com.brocade.dcm.authentication.server.shiro.DCMRealmAuthenticator - Authentication failed for user ROuser status 0 
authentication-rbac-mw - [ERROR] 2024-04-23 16:29:51.572 [http-nio-12009-exec-17] com.brocade.dcm.authentication.server.shiro.DCMRealmAuthenticator - Authentication failed for user ROuser authType Local Database
authentication-rbac-mw - [ERROR] 2024-04-23 16:29:51.572 [http-nio-12009-exec-17] com.brocade.dcm.authentication.server.controller.AuthenticationController - Login failed! Authentication exception occured for client 10.1.xx.xx
org.apache.shiro.authc.AuthenticationException: Invalid username and password

Sign in to view the entire content of this KB article.

New to NetApp?

Learn more about our award-winning Support

NetApp provides no representations or warranties regarding the accuracy or reliability or serviceability of any information or recommendations provided in this publication or with respect to any results that may be obtained by the use of the information or observance of any recommendations provided herein. The information in this document is distributed AS IS and the use of this information or the implementation of any recommendations or techniques herein is a customer's responsibility and depends on the customer's ability to evaluate and integrate them into the customer's operational environment. This document and the information contained herein may be used solely in connection with the NetApp products discussed in this document.