C4 Agent Operation Interface Authentication
The interface authentication mode can be static or dynamic authentication. The dynamic authentication mode is used by default.
- The static authentication mode is used only at historical sites that are compatible with earlier versions. The new sites need to use the dynamic authentication mode.
- When the static authentication mode is used, GUIDs may be stolen by guessing and used for spoofing, which is insecure. Exercise caution when using this mode. At historical sites, upgrade the third-party system as soon as possible and use the dynamic authentication mode.
Static Authentication
- Modify the configuration in agentgateway/WEB-INF/config/basic.properties:
AUTHMODE = 1
- After invoking the sign-in interface to sign in successfully, the agent can obtain the Set-GUID header from the response header of the request, for example, JSESSIONID=27************f5.AgentGateway0. In the header, 27************f5.AgentGateway0 is the GUID, which is the authentication information of the agent. When invoking another interface, the agent needs to set the guid header in the HTTP request header to the obtained GUID. The CC-Gateway will obtain the GUID from the HTTP request header to compare with the value of the Set-GUID header delivered previously. If they are the same, the agent is authenticated. If they are different, the agent fails to be authenticated, and code 100-006 or 000-003 is returned.
Dynamic Authentication
Dynamic authentication is an enhancement of static authentication. The GUID updates periodically.
- Modify the configuration in agentgateway/WEB-INF/config/basic.properties:
AUTHMODE = 2
- When the GUID is changed, obtain the Set-GUID header from the response header of the HTTP request of the event obtaining interface, for example, JSESSIONID=27************f5.AgentGateway0. In the header, 27************f5.AgentGateway0 is the GUID, which is the authentication information of the agent.
- The basic.properties file for dynamic authentication has the following two configuration items, which are not included in the basic.properties file for static authentication:
GUIDINTERVAL = 60000 //GUID update interval GUIDTIMEOUT = 120000 //GUID timeout interval
The units of both configuration items are millisecond. The value of GUIDINTERVAL must be less than the value of GUIDTIMEOUT.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot