Penn Computing
Computing Menu Computing A-Z
Computing Home Information Systems & Computing Penn
FOR ARCHIVAL PURPOSES ONLY
The following instructions apply to using Websec to authenticate for web applications. Websec was retired in December 2009 and replaced by a new authentication system, Penn Weblogin.
/*
 * Public messages and message codes for the web security module.
 */


/* Commands available to the client */
#define HELO            "helo"
#define PASSWORD        "password"
#define ENCRYPTION_TYPE     "encryption"
#define EXPIRE_TOKEN        "expire_token"
#define QUERY_TOKEN     "query_token"
#define QUIT            "quit"


/* Available descriptive codes to return to client
 * Success codes first...
 */
#define EXPIRE_SUCCESS_NUM      201
#define QUERY_SUCCESS_NUM       203
#define MESSAGE_HELO_NUM        210
#define AUTHENTICATION_SUCCESS_NUM  211
#define ENCRYPTION_SPECIFIED_NUM    212
#define QUIT_SUCCESS_NUM        220


/* Now error codes... */
#define ERROR_INVALID_TOKEN_NUM     301
#define ERROR_TOKEN_TIMED_OUT_NUM   302


#define ERROR_BAD_COMMAND_NUM       500
#define ERROR_BAD_GREETING_NUM      501
#define ERROR_BAD_PASSWORD_NUM      502
#define ERROR_BAD_ENCRYPTION_NUM    503
#define ERROR_RECV_MSG_NUM      510
#define ERROR_INTERNAL_NUM      511
#define ERROR_DATABASE_NUM      512
#define ERROR_TOO_LONG_NUM      520
#define ERROR_BAD_FORMAT_NUM        521
#define ERROR_BAD_PERMISSIONS_NUM   540


/* Available diagnostic messages to return to the client
 * pertaining to above return codes.
 */
#define ERROR_INVALID_TOKEN "Invalid token"
#define ERROR_TOKEN_TIMED_OUT   "Token timed out"
#define ERROR_BAD_COMMAND   "Invalid command"
#define ERROR_BAD_GREETING  "Invalid greeting"
#define ERROR_BAD_PASSWORD  "Invalid password"
#define ERROR_BAD_ENCRYPTION    "Invalid encryption algorithm"
#define ERROR_RECV_MSG      "Error receiving message"
#define ERROR_INTERNAL      "Internal error"        
#define ERROR_DATABASE      "Database error"        
#define ERROR_TOO_LONG      "Input data too long"       
#define ERROR_BAD_FORMAT    "Syntax Error"          
#define ERROR_BAD_PERMISSIONS   "Invalid permission"


/* Available "success" descriptions to return to the client */
#define MESSAGE_HELO        "Pleased to ask you to authenticate:"
#define ENCRYPTION_SPECIFIED    "Encryption mode specified successfully"
#define QUIT_SUCCESS        "Closing connection"
#define PENNNET_ID_RESULT   "PennNet ID"
#define PERSON_ID_RESULT    "9-digit PennID"
#define PENN_ID_RESULT      "8-digit PennID"
#define TIMESTAMP_RESULT    "Timestamp"
#define IP_ADDRESS_RESULT   "IP Address"
#define APP_RESULT      "Application"
#define GROUPS_RESULT       "Groups"
#define SUCCESS_RESULT      "Success"

top

Information Systems and Computing
University of Pennsylvania
Comments & Questions


University of Pennsylvania Penn Computing University of Pennsylvania Information Systems & Computing (ISC)
Information Systems and Computing, University of Pennsylvania