Pulse Secure Virtual Traffic Manager: Trafficscript Guide Supporting Pulse Secure Virtual Traffic Manager 19.1
Total Page:16
File Type:pdf, Size:1020Kb
Pulse Secure Virtual Traffic Manager: TrafficScript Guide Supporting Pulse Secure Virtual Traffic Manager 19.1 Product Release 19.1 Published 29 April, 2019 Document Version 1.0 Pulse Secure Virtual Traffic Manager: TrafficScript Guide Pulse Secure, LLC 2700 Zanker Road, Suite 200 San Jose CA 95134 www.pulsesecure.net © 2019 by Pulse Secure, LLC. All rights reserved. Pulse Secure and the Pulse Secure logo are trademarks of Pulse Secure, LLC in the United States. All other trademarks, service marks, registered trademarks, or registered service marks are the property of their respective owners. Pulse Secure, LLC assumes no responsibility for any inaccuracies in this document. Pulse Secure, LLC reserves the right to change, modify, transfer, or otherwise revise this publication without notice. Pulse Secure Virtual Traffic Manager: TrafficScript Guide The information in this document is current as of the date on the title page. END USER LICENSE AGREEMENT The Pulse Secure product that is the subject of this technical documentation consists of (or is intended for use with) Pulse Secure software. Use of such software is subject to the terms and conditions of the End User License Agreement (“EULA”) posted at http://www.pulsesecure.net/support/eula/. By downloading, installing or using such software, you agree to the terms and conditions of that EULA. © 2019 Pulse Secure, LLC. Pulse Secure Virtual Traffic Manager: TrafficScript Guide Contents PREFACE . 1 DOCUMENT CONVENTIONS . 1 TEXT FORMATTING CONVENTIONS . 1 COMMAND SYNTAX CONVENTIONS . 1 NOTES AND WARNINGS. 2 REQUESTING TECHNICAL SUPPORT . 2 SELF-HELP ONLINE TOOLS AND RESOURCES. 2 OPENING A CASE WITH PSGSC . 3 INTRODUCTION. 5 ABOUT THIS GUIDE. 5 THE TRAFFICSCRIPT LANGUAGE . 5 TRAFFICSCRIPT EXAMPLES. 6 APPLICATION OF RULES . 7 USING A TRAFFICSCRIPT RULE . 8 TRAFFICSCRIPT SYNTAX . 13 STATEMENTS . 13 CONSTANTS. 13 VARIABLES . 14 EXPRESSIONS. 15 OPERATORS . 15 TYPE CASTS IN TRAFFICSCRIPT. 18 CONDITIONALS . 18 THE “IF” STATEMENT . 19 THE "SWITCH" STATEMENT . 19 LOOPS . 21 “FOR” LOOPS . 21 ‘WHILE’ LOOPS . 21 “DO” LOOPS . 21 “FOREACH” LOOPS . 22 OTHER FLOW CONTROL. 22 COMPLEX DATA TYPES . 22 ARRAYS . 22 HASHES. 23 THE GLOBAL ASSOCIATIVE ARRAY. 24 THE PROCESS-LOCAL ASSOCIATIVE ARRAY . 25 © 2019 Pulse Secure, LLC. i Pulse Secure Virtual Traffic Manager: TrafficScript Guide THE CONNECTION-LOCAL ARRAY . 25 LIBRARIES . 25 FUNCTIONS . 27 ESCAPING REGULAR EXPRESSIONS. 27 CREATING NEW SUBROUTINES IN TRAFFICSCRIPT . 28 SYNTAX . 28 REQUEST AND RESPONSE RULES . 29 PROCESSING MULTIPLE REQUESTS AND RESPONSES . 30 SPECIALIZED PROTOCOL HANDLING FUNCTIONS . 30 PROCESSING OTHER PROTOCOLS. 31 THE STATE MACHINE IN DETAIL . 31 CONTROLLING THE STATE MACHINE . 31 SAMPLE TRAFFICSCRIPT RULES. 33 ROUTING BY CONTENT TYPE . 33 RESTRICTING ACCESS BASED ON THE TIME OF DAY. 33 CUSTOMER PRIORITIZATION. 34 ROUTING BASED ON XML TRAFFIC . 35 EXAMPLE: GOOGLE SEARCH REQUEST. 35 AUTHENTICATING USER ACCESS. ..