TCS Security API Quiz
Test your knowledge of the TCS Security API including methods for preventing XSS, CSRF, SQL injection, path traversal, password hashing, and other security vulnerabilities.
Questions
The usage of setRememberToken is
- Generally recommended
- Generally not recommended
- Should always be used
- Should not be used at all
What are the different levels of logging provided in the API?
- Trace, warn, error and fatal
- Trace, debug, info, warn, error and fatal
- Debug, info, error, fatal
- Debug, Warn, Error
Which methods in the TCS SAPI can be used to prevent Cross Site Scripting Attacks?
- isSafeHTML(java.lang.String context, java.lang.String input, boolean allowNull) and encodeForHTML(java.lang.String input)
- isSafeHTML(java.lang.String context, java.lang.String input)
- SafeHTML(java.lang.String context, java.lang.String input)
- ValidHTML(java.lang.String context, java.lang.String input)
What is the base class for all Security related exceptions in the security API?
- SecurityException
- EnterpriseException
- EnterpriseSecurityException
- None of the above
What is used as the salt value in the hash function available in the TCS SAPI?
- A constant value stored as plain text within a configuration file
- There is no salt added while calculating the hash value
- The accountName is used as the salt value
- The salt value is calculated from the password value
What is meant by Canonicalization?
- Its a form of encoding
- Its a form of encryption
- Its a form of decryption
- Its simply the operation of reducing a possibly encoded string down to its simplest form
What is the functionality of the sign() method?
- Encrypts the input and returns the encrypted string
- Encodes the data
- Hashes the data
- Create a digital signature for the provided input data and return the signature in a string
Which methods in the TCS SAPI can be used to prevent Path Traversal?
- isValidDirectory( java.lang.String context, java.lang.String input)
- isValidDirectory( java.lang.String context, java.lang.String input) and isValidFileName(java.lang.String context, java.lang.String input)
- isSafeDirectoryPath(java.lang.String context, java.lang.String input,boolean allowNull) and isSafeFileName(java.lang.String context, java.lang.String input,boolean allowNull)
- ValidateDirectoryPath(java.lang.String context, java.lang.String input,boolean allowNull)
What is the method signature for hashing password?
- String hashPassword(String password)
- String hashPassword(String password, String accountName)
- String hashpassword(String password)
- None of the above
What is the return type of the verifyPasswordStrength() method in the security API?
- Boolean
- String
- Integer
- void
What is the return type of the isAuthorizedForData() method in the security API?
- String
- boolean
- Integer
- void
What is the return type of the getCSRFToken() method?
- Integer
- Byte
- String
- BigInteger
What kind of exception does the method login(HttpServletRequest request, HttpServletResponse response) throw?
- LoginException
- EnterpriseSecurityException
- SecurityException
- IntrusionException
Which are the default scripting codecs supported by the security API
- JavaScript
- VBScript
- Both of the above
- None of the above
Which are the default codecs supported to help encode characters to be safely used on OS command shells
- Unix Codec
- Windows Codec
- Unix and Windows Codec
- Linux Codec
The security API supports codecs for SQL Strings of which of the following databases ?
- Oracle
- MySQL
- Both of the above
- Oracle, MySQL, Sybase, DB2
What is the functionality of the seal() method ?
- Creates a seal that binds a set of data and includes an expiration timestamp
- Encodes the data
- Hashes the data
- Scrambles the data
What method is provided within the security API to prevent caching by browsers and proxies?
- void setNoCacheHeaders(javax.servlet.http.HttpServletResponse response)
- void setNoCacheHeaders(javax.servlet.http.HttpServletRequest request)
- boolean setNoCacheHeader(javax.servlet.http.HttpServletResponse response)
- void setNoCacheHeaders(javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException
Which method among the below could be used as a defense against Cross Site Request Forgery?
- encryptHiddenField(java.lang.String value)
- addCSRFToken(final java.lang.String href)
- verifySecureComm(javax.servlet.http.HttpServletRequest request)
- setSafeContentType(javax.servlet.http.HttpServletResponse response)
Which set of security API methods could be used as the best defense against Cross Site Scripting?
- Input Validation and OutPut Encoding
- Authentication and Authorization
- Data Protection and Cryptography
- HTTP and Communication Security