#-------------- Service -------------------------- [Service] ServiceName=LVWSSslAdmin ServiceType=C_REST ServiceDllPath=ssladminsvc ViList=server_certs:open_csrs:server_certs_list LabVIEWVersion=9.0 NumRoutingTemplates=8 # TODO[dkw]: Secure this service using WSSK PublishStatistics=FALSE #---------------------------------------------- #---------------------------------------------- #------------ Routing Templates --------------- #---------------------------------------------- #---------------------------------------------- #---------------------------------------------- # server_certs # # GET /LVWSSslAdmin/server_certs # # result = SUCCESS # HTTP Response Code = 200 # # Return a document listing key information about # all installed certificates. # # # NumberOfCertificates=N # CertificateInstance=1 // only if N > 0 # HandleString=sss # CommonName=sss # CertificatePath=sss // absolute path # KeyfilePath=sss # CertificateInstance=2 # HandleString=sss # CommonName=sss # CertificatePath=sss // absolute path # KeyfilePath=sss # ... # CertificateInstance=N # HandleString=sss # CommonName=sss # CertificatePath=sss // absolute path # KeyfilePath=sss # # # result = ERROR # Internal error: # HTTP Response Code = 500 # [RoutingTemplate_1] Template=/server_certs Type=Method HttpMethod=GET ViName=server_certs_list DefaultString= Permissions=SSLAdminReadCerts #---------------------------------------------- # server_certs # # GET /LVWSSslAdmin/server_certs/:handleNumber # # result = SUCCESS # HTTP Response Code = 200 # # Read a certificate specified by handleNumber. # Returns fields from the certificate and the certificate itself in # the document body in the following format: # # # Filename= # HandleNumber=nnn # CommonName=sss # CountryName=sss # StateOrProvinceName=sss # LocalityName=sss # OrganizationName=sss # OrganizationalUnitName=sss # SubjectAltName=sss # KeyUsage=sss # SerialNumber=nnn # NotBefore=sss # NotAfter=sss # # # # END # # # Note: The DSM will need to know where to write the file # and parse it out, or, display all this stuff in a # text box and let the user cut and paste it out # to a file themselves # # result = ERROR # Bad handle number: # HTTP Response Code = 404 # Other error: # HTTP Response Code = 500 # [RoutingTemplate_2] Template=/server_certs/:handleNumber Type=Method HttpMethod=GET ViName=server_certs DefaultString= Permissions=SSLAdminReadCerts #---------------------------------------------- # server_certs # # DELETE /LVWSSslAdmin/server_certs/:handleNumber # # If a certificate with handleNumber exists in the # server_certs directory, delete the file and # remove the certificate data and it's logos points # from the maps. # # Handle 0 is special, it is the default certificate. # It will be automatically generated at system startup # if it does not exist. It *is* DELTEable. # # result = SUCCESS # HTTP Response Code = 200 # # result = ERROR # Bad handle number: # HTTP Response Code = 404 # Other error: # HTTP Response Code = 500 # [RoutingTemplate_3] Template=/server_certs/:handleNumber Type=Method HttpMethod=DELETE ViName=server_certs DefaultString= Permissions=SSLAdminModifyCerts #---------------------------------------------- # server_certs # # POST /LVWSSslAdmin/server_certs # # Posts a form to us of the form: # # # # CommonName=sss& # CountryName=sss& # StateOrProvinceName=sss& # LocalityName=sss& # OrganizationName=sss& # OrganizationalUnitName=sss& # SubjectAltName=sss& # ValidForDays=nnn # # Create a self-signed certificate using # the provided fields. Return the certificate # file in the response body in the form: # # # HandleNumber=nnn # # # END # # # result = SUCCESS # HTTP Response Code = 200 # # result = ERROR # Bad form data: # HTTP Response Code = 400 # Other error: # HTTP Response Code = 500 # [RoutingTemplate_4] Template=/server_certs Type=Method HttpMethod=POST ViName=server_certs DefaultString= Permissions=SSLAdminModifyCerts #---------------------------------------------- # open_csrs # # POST /LVWSSslAdmin/open_csrs # # Posts a form to us of the form: # # # # CommonName=sss& # CountryName=sss& # StateOrProvinceName=sss& # LocalityName=sss& # OrganizationName=sss& # OrganizationalUnitName=sss& # SubjectAltName=sss # # Create a certificate signing request using # the provided fields. Return the certificate # signing request file in the response body # in the form: # # # HandleNumber=nnn # # # END # # # result = SUCCESS # HTTP Response Code = 200 # # result = ERROR # Bad form data: # HTTP Response Code = 400 # Other error: # HTTP Response Code = 500 # [RoutingTemplate_5] Template=/open_csrs Type=Method HttpMethod=POST ViName=open_csrs DefaultString= Permissions=SSLAdminModifyCerts #---------------------------------------------- # open_csrs # # DELETE /LVWSSslAdmin/open_csrs/:handleNumber # # If a certificate signing request with handleNumber exists # in the open_csrs directory, delete the .csr and .key files, # and remove the certificate signing request data and it's # logos points from the maps. # # result = SUCCESS # HTTP Response Code = 200 # # result = ERROR # Bad handle number: # HTTP Response Code = 404 # Other error: # HTTP Response Code = 500 # [RoutingTemplate_6] Template=/open_csrs/:handleNumber Type=Method HttpMethod=DELETE ViName=open_csrs DefaultString= Permissions=SSLAdminModifyCerts #---------------------------------------------- # open_csrs # # GET /LVWSSslAdmin/open_csrs/:handleNumber # # result = SUCCESS # HTTP Response Code = 200 # # Read a certificate specified by handleNumber. # Returns fields from the certificate and the certificate itself in # the document body in the following format: # # # Filename= # HandleNumber=nnn # CommonName=sss # CountryName=sss # StateOrProvinceName=sss # LocalityName=sss # OrganizationName=sss # OrganizationalUnitName=sss # SubjectAltName=sss # # # # END # # # Note: The DSM will need to know where to write the file # and parse it out, or, display all this stuff in a # text box and let the user cut and paste it out # to a file themselves # # result = ERROR # Bad handle number: # HTTP Response Code = 404 # Other error: # HTTP Response Code = 500 # [RoutingTemplate_7] Template=/open_csrs/:handleNumber Type=Method HttpMethod=GET ViName=open_csrs DefaultString=:handleNumber="0" Permissions=SSLAdminReadCerts #---------------------------------------------- # open_csrs # # PUT /LVWSSslAdmin/open_csrs/:handleNumber # # Install a certificate file corresponding to an open # certificate signing request. The handleNumber refers # to the open_csrs handleNumber. The handleNumber will # be reused for the installed certificate # # The new certificate file will be sent in the postdata: # # # # CertificateFile=sss # # # result = SUCCESS # HTTP Response Code = 200 # # result = ERROR # Bad handle number: # HTTP Response Code = 404 # Bad/missing supplied certificate: # HTTP Repsonse Code = 400 # Other error: # HTTP Response Code = 500 # [RoutingTemplate_8] Template=/open_csrs/:handleNumber Type=Method HttpMethod=PUT ViName=open_csrs DefaultString= Permissions=SSLAdminModifyCerts #-------------------------------------------------- #-------------------------------------------------- #----------------- VIs ---------------------------- #-------------------------------------------------- #-------------------------------------------------- [server_certs] Name=server_certs Path= TerminalList=handleNumber OutputMode=Stream TerminalOutputType=XML [open_csrs] Name=open_csrs Path= TerminalList=handleNumber OutputMode=Stream TerminalOutputType=XML [server_certs_list] Name=server_certs_list Path= TerminalList= OutputMode=Stream TerminalOutputType=XML #--------------------------------------------------------------------- # Terminal configuration # Name = Control/indicator label, referenced in VI TerminalList # ConnPaneNum = Connector pane number of the terminal # IoStatus = input, output # LVTypeString: # "String" # "Path" # "Bool" # "I8" # "I16" # "I32" # "I64" # "U8" # "U16" # "U32" # "U64" # "SGL" # "DBL" #--------------------------------------------------------------------- #---------------------------------------------------- #---------------------------------------------------- #--------------- Terminals -------------------------- #---------------------------------------------------- #---------------------------------------------------- [server_certs_handleNumber] Name=handleNumber ConnPaneNum=1 IoStatus=input LVTypeString=U32 [open_csrs_handleNumber] Name=handleNumber ConnPaneNum=1 IoStatus=input LVTypeString=U32