300-435 · Question #139
Refer to the exhibit. An engineer is tasked to configure a Cisco IOS-XE router using restconf. The base64 code Cisco IOS-XE router uses is 1A2B3C4D5E6F7G8H910. Which line of code must be added to…
The correct answer is A. 'Authorization': 'Basic 1A2B3C4D5E6F7G8H910'. This question tests knowledge of HTTP authentication headers, specifically for RESTCONF APIs on Cisco IOS-XE, which commonly use Basic Authentication.
Question
Options
- A'Authorization': 'Basic 1A2B3C4D5E6F7G8H910'
- B'X-XSRF-TOKEN': '1A2B3C4D5E6F7G8H910'
- C'secure-token': '1A2B3C4D5E6F7G8H910'
- D'x-auth-token': '1A2B3C4D5E6F7G8H910'
How the community answered
(26 responses)- A88% (23)
- B8% (2)
- D4% (1)
Why each option
This question tests knowledge of HTTP authentication headers, specifically for RESTCONF APIs on Cisco IOS-XE, which commonly use Basic Authentication.
RESTCONF APIs on Cisco IOS-XE often utilize HTTP Basic Authentication for secure access, where the username and password (or a token derived from them) are base64-encoded and sent in the 'Authorization' header with the 'Basic' scheme. Therefore, 'Authorization': 'Basic 1A2B3C4D5E6F7G8H910' correctly formats the header.
'X-XSRF-TOKEN' is an HTTP header used for Cross-Site Request Forgery (XSRF) protection, a different security mechanism not typically used for basic authentication with base64-encoded credentials.
'secure-token' is not a standard or commonly recognized HTTP header for authentication in the context of RESTCONF on Cisco IOS-XE.
'x-auth-token' is a custom header often used for token-based authentication, but for a base64-encoded credential described as 'code', Basic Authentication is the standard and most fitting method.
Concept tested: RESTCONF authentication, HTTP Basic Auth
Source: https://developer.cisco.com/docs/ios-xe/#!restconf-developer-guide/restconf-api
Topics
Community Discussion
No community discussion yet for this question.