CAS-004 Exam QuestionsBrowse all questions from this exam

CAS-004 Exam - Question 81


An enterprise is deploying APIs that utilize a private key and a public key to ensure the connection string is protected. To connect to the API, customers must use the private key.

Which of the following would BEST secure the REST API connection to the database while preventing the use of a hard-coded string in the request string?

Show Answer
Correct Answer: AD

A

Reference:

https://eclipsesource.com/blogs/2016/07/06/keyed-hash-message-authentication-code-in-rest-apis/

Discussion

8 comments
Sign in to comment
BLADESWIFTKNIFEOption: D
Jan 27, 2023

How does HMAC provide authentication? Hash-based message authentication code (or HMAC) is a cryptographic authentication technique that uses a hash function and a secret key. With HMAC, you can achieve authentication and verify that data is correct and authentic with shared secrets, as opposed to approaches that use signatures and asymmetric cryptography.

ryanzouOption: D
Nov 5, 2022

I would choose D

chil7chil7Option: D
Nov 24, 2022

RSET API - HMAC

ts260Option: D
Sep 17, 2022

It's D. The explanation describes D

adamwellaOption: D
Sep 23, 2022

REST APIs that serve their content via HTTP have limited options for authentication. One of these is request signing. With a little bit of custom specification the standard approach HMAC can be utilized for efficient and secure authentication.

BiteSizeOption: D
Jul 19, 2023

Source: Verifying each answer against Chat GPT, my experience, other test banks, a written book, and weighing in the discussion from all users to create a 100% accurate guide for myself before I take the exam. (It isn't easy because of the time needed, but it is doing my diligence)

e4af987
Apr 1, 2024

Ive been doing the same - using Gemini, ChatGPT and Copilot - problem is - they a give different answers. And you can give the same question the next day and they might give another answer. I find they are also very biased - they have valid arguments but they totally disregard some parts of the scenario. Then you call them out on it and they change their answer... so... good luck to us all!

OdinAtlasSteelOption: D
Nov 14, 2023

HMAC (Hash-based Message Authentication Code) is a cryptographic method used for message authentication. It involves a process that uses a secret key along with a cryptographic hash function to create a hash-based authentication code. In this context, using HMAC for the keys would allow the creation of a secure hash value based on the private key, ensuring that the connection string isn't transmitted in plain text. HMAC provides a way to sign and verify the integrity and authenticity of the API request without exposing the private key in the request string. It ensures that the connection remains secure without the risk of exposing sensitive information like hard-coded strings or private keys.

23169fdOption: D
Jul 12, 2024

HMAC (Hash-based Message Authentication Code): Purpose: HMAC is used to ensure data integrity and authenticity by combining a secret key with the message. It generates a hash that can be verified on the receiving end using the same secret key. Prevents Hard-Coding: By using HMAC, the private key is not directly embedded in the request. Instead, it is used to generate a hash that secures the data. This means that even if the request string is intercepted, the actual key remains protected. Security: HMAC provides strong security guarantees and ensures that the data has not been tampered with. It is widely used in secure API authentication.