Securetransport 5.3.0 Developer's Guide 3 Installing External Agents 31 External Agent Examples 32 Mail Notification on File Receipt 32 Permissions 33
Total Page:16
File Type:pdf, Size:1020Kb
SecureTransport Version 5.3.0 3 April 2019 Developer's Guide Copyright © 2015 Axway All rights reserved. This documentation describes the following Axway software: Axway SecureTransport 5.3.0 No part of this publication may be reproduced, transmitted, stored in a retrieval system, or translated into any human or computer language, in any form or by any means, electronic, mechanical, magnetic, optical, chemical, manual, or otherwise, without the prior written permission of the copyright owner, Axway. This document, provided for informational purposes only, may be subject to significant modification. The descriptions and information in this document may not necessarily accurately represent or reflect the current or planned functions of this product. Axway may change this publication, the product described herein, or both. These changes will be incorporated in new versions of this document. Axway does not warrant that this document is error free. Axway recognizes the rights of the holders of all trademarks used in its publications. The documentation may provide hyperlinks to third-party web sites or access to third-party content. Links and access to these sites are provided for your convenience only. Axway does not control, endorse or guarantee content found in such sites. Axway is not responsible for any content, associated links, resources or services associated with a third-party site. Axway shall not be liable for any loss or damage of any sort associated with your use of third-party content. Contents Preface 8 Who should read this document 8 Related documentation 8 Get more help 9 Training 10 Accessibility 11 Documentation accessibility 11 Keyboard-only navigation 11 Screen reader support 11 Support for high contrast and accessible use of colors 11 1 Overview 12 2 Customizing SecureTransport 13 About customization 13 Transaction Manager 14 When to customize 14 How rules work 15 Conditions 15 Actions 15 Precedence 16 Using NextPrecedence 16 SecureTransport built-in rules packages 16 Custom rules 18 Using built-in agents 21 NextPrecedence 21 Continue 23 SetExitValue 24 SecureTransport Software Development Kit 25 SecureTransport APIs 25 Sample agents and applications 26 3 Developing external agents 27 External agent overview 27 Developing and triggering external agents 27 Calling interface 28 Running external agents 29 Chaining external agents 30 Axway SecureTransport 5.3.0 Developer's Guide 3 Installing external agents 31 External agent examples 32 Mail notification on file receipt 32 Permissions 33 4 Developing in-process agents 34 Developing in-process agents overview 34 Creating in-process agents 35 Agent creation at a glance 35 In-process agent interface 36 Installing in-process agents 37 In-process agent examples 38 Installing the examples 38 Mail notification on file receipt 39 Denying permission to upload specific file types 41 Deleting a file after it is transferred to a destination 42 About the Transaction Manager API 43 BaseAgent class 43 Events class 45 Logging 46 5 Using the application framework 47 About the application framework 47 Using the application framework or custom rules 48 Key terms 49 Application framework classes and interfaces 50 Pluggable UI overview 54 Custom JSP files 54 Implementing data handlers 57 Creating custom applications 62 Defining application settings 63 Defining subscription settings 65 Defining application agents 66 ApplicationRuntime interface 67 Using ApplicationManager 69 Custom attributes 71 Post-transfer actions 72 Certificate Manager 73 CertificateReference 74 CertificateDetails 74 CertificateManager 75 Working with AccountManager 76 Working with transfer sites 78 Working with template accounts 80 Axway SecureTransport 5.3.0 Developer's Guide 4 Working with business units 81 Example 81 Working with data transformations 82 Data transformation overview 82 Developing data transformation modules 83 Installing transformation modules 88 Transformation example 88 Working with ConfigurationManager 88 Working with InvocationManager 91 Utility script: option_value_change 92 ChangeConfigurationOption.java 93 DefaultResult.java 97 OptionValueChangeInvocableTask.java 99 Working with NavigationManager 101 Working with ServiceCheck 104 Working with ClusteredManager 105 6 Working with event types 106 Authentication and session management events 106 Sessions 107 Certificate Verification event 108 User Configuration event 110 Password Authentication event 114 Login event 116 Logout event 116 SessionEnd event 117 File transfer authorization and audit events 117 Incoming Start event 118 Incoming End event 119 Incoming Error event 120 Incoming Abort event 120 Outgoing Start event 121 Outgoing End event 122 Outgoing Error event 122 Outgoing Abort event 123 File transfer upload and download events 123 FTP Cmd - STOR event 124 FTP Cmd - RETR event 125 FTP Cmd - REST event 126 FTP Cmd - MDTM event 126 FTP Cmd - SIZE event 127 FTP Cmd - RTCK event 128 File and directory management events 129 FTP Cmd - LIST event 130 Axway SecureTransport 5.3.0 Developer's Guide 5 FTP Cmd - NLST event 132 FTP Cmd - CWD event 133 FTP Cmd - DELE event 134 FTP Cmd - MKD event 135 FTP Cmd - PWD event 135 FTP Cmd - RMD event 136 FTP Cmd - RNFR event 136 FTP Cmd - RNTO event 137 FTP Cmd - CHMOD event 138 FTP Cmd - MIRR event 139 Server extension events 139 HTTP Cmd - POST event 139 FTP Cmd - SITE event 140 Application framework events 140 Application - Init event 140 Application - Schedule event 141 Application - Incoming event 142 Server-initiated transfer events 142 Server Transfer - Pull event 143 Server Transfer - Push event 143 Schedule event 144 Environment variables 144 Exit codes 145 Transformation event 145 Environment variables 145 Exit codes 145 Password Change event 146 FTP Cmd - CHPWD event 146 Arguments 146 Exit codes 146 PeSIT transfer state coordination events 147 PeSIT Pause event 147 PeSIT Resume event 148 PeSIT SaveMap event 148 PeSIT GetMap event 148 PeSIT ClearMap event 149 PeSIT Ack event 149 Mailbox folder event 149 PMfolderSummary event 150 Environment variable 150 Exit codes 150 Output stream 150 Address book events 150 AddressBook - CreateContact event 151 Axway SecureTransport 5.3.0 Developer's Guide 6 AddressBook - DeleteContact event 151 AddressBook - RetrieveContact event 152 AddressBook – UpdateContact event 153 7 Using environment variables 155 Predefined environment variables 155 Common environment variables 155 Session environment variables 156 Application framework object environment variables 159 Additional environment variables 168 LDAP session state variables 173 Adding custom environment variables 174 Displaying custom environment variables 175 8 File services interface 177 File services interface introduction 177 Registering a file services interface protocol 177 Example 179 Enabling PeSIT message parameters 180 Standard file services interface connectors 180 FileServicesInterfaceScriptBasedConnector 181 FileServicesInterfaceFileBasedConnector 182 Implementing a file services interface connector 184 9 REST API 185 REST API overview 185 REST API examples 186 Create an account 186 Push a file 209 Custom HTML template 211 Java file transfer library 218 Appendix A: Agent execution order 224 Client-initiated transfers 224 Server-initiated transfers 225 Appendix B: Developing condition functions 226 Condition functions overview 226 Condition functions 226 File content search example 226 Installing condition functions 227 Axway SecureTransport 5.3.0 Developer's Guide 7 Preface The SecureTransport Developer's Guide describes the components and tasks associated with customizing the Axway SecureTransport Server. It provides background, conceptual, and procedural information for creating and modifying rules, including creating agents. Before implementing the tasks described in this manual, make sure that SecureTransport is installed as described in the SecureTransport Installation Guide. Who should read this document This guide is intended for developers who create customizations for SecureTransport. Developers can use a scripting language such as Perl or Python to create external agents or Java to create in- process agents when customizing SecureTransport. Some topics cover information dealing with system administration connected with customization. Related documentation SecureTransport provides the following documentation: l SecureTransport Installation Guide – This guide explains how to install, upgrade, and uninstall SecureTransport Server on UNIX-based platforms, Microsoft Windows, and Axway Appliances. l SecureTransport Getting Started Guide – This guide explains the initial setup and configuration of SecureTransport using the SecureTransport Administrator setup interface. l SecureTransport Administrator's Guide – This guide describes how to use the SecureTransport Administration Tool to configure and administer your SecureTransport Server. The content of this guide is also available in the Administration Tool online help. l SecureTransport Web Client User Guide – This guide describes how to use the SecureTransport Browser Client and Web Access Plus to transfer files between your local machine and your SecureTransport Server. The Web Access Plus content of this guide is also available in the Web Access Plus online help. l SecureTransport Release Notes – This document contains information about new features and enhancements, late-breaking information that could not be included in one of the other documents, and a list of known and fixed issues. l SecureTransport Developer's Guide – (This