Skip to content

ShieldSquare/ss2_go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

========================================
SHIELDSQUARE GO LANG INTEGRATION GUIDE
========================================

========================================
Version: Go Language connector V-5.3.0
========================================

========================================
INTRODUCTION
========================================
This guide contains crisp instructions to integrate ShieldSquare for Real-time Bot management Solution with your GoLang Web application. You can start the integration in Monitor Mode wherein you can analyse the site traffic and uncover all malicious bot related information. There is no action performed for prevention of the bot activities, rather the website is staged for studying and observing all the bot/genuine hits encountered.
..............................................................................

========================================
CONFIGURE config.json
========================================

{
  "key":"Your Sandbox ID",
  "api_server_domain":"ss_sa.shieldsquare.net",
  "api_server_timeout":100,
  "api_server_ssl_enabled":true/false,
  "deployment_number":"xxxx",
  "log_path":"/tmp/"

}

key             :   This holds the subscriber id of the user which can be
                    obtained by clicking on the Subscriber id details link on
                    the dashboard.Choose Sandbox Id as you are integrating for
                    the very first time.
                    Note:Sandbox Id is meant for only testing and verification
                    purposes and requests sent using this ID will not be
                    persisted by ShieldSquare Service. You can replace Sandbox
                    ID with Production ID once you want to move to Production
                    environment.

api_server_domain   : Select the ShieldSquare server closest to the website’s
                    server and assign it to the ss_apicloud_server property.
                    Available options are:-
                                         US – ss_scus.shieldsquare.net
                                         India/Asia – ss_sa.shieldsquare.net
                                         Australia – ss_au.shieldsquare.net
                                         Europe – ss_ew.shieldsquare.net
                    Quick Tip:To help you find out our nearest servers use
                    this Jar file. For other locations, refer this Link. For
                    further assistance, please reach us at
                    support@shieldsquare.com



api_server_timeout   :   This is timeout value after which if no response
                    connection will get terminated between golang and cfm

api_server_ssl_enabled :   If endpoint is ssl enabled, set this value to true

deployment_number :        This holds the environment ID of the user which can be obtained from the dashboard.
                           You can obtain this by clicking on Environment settings and selecting your environment.
                           When you create GoLang environment at that time your environment settings will be assigned with
                           a environment ID.

log_path        :   Path where you wan to keep the log files.

..............................................................................

========================================
HOW TO USE ShieldSquare Go Connector.
========================================
1. Declare an environment variable "PATH_TO_SS". This contains the path to the directory where you're going to store the files you downloaded from ShieldSquare Dashboard.
2. Copy the ss2_config.json and ShieldsquareCABundle.pem files which you downloaded from ShieldSquare Dashboard to "PATH_TO_SS" directory which you declared earlier.
3. Do 'go get github.com/shieldsquare/ss2_go/'
4. Pass userid parameter to ValidateRequest()

    userid : Set the user-name/user-id/hash-value of the logged-in visitors to user. user is an optional parameter. Customer can leave it as empty string.

    call_type :
    =================================
    1 -> for a normal page request
    2 -> for form submit
    6 -> for a mobile APP
    7 -> for a feature phone
    =================================
5. call function ValidateRequest in your request handler
Note: ValidateRequest returns result which contain responsecode

RESPONSE CODES
=================
    0  -> Valid request
    2  -> Display captcha code
    3  -> User blocked
    4  -> Feed Fake data
   -1  -> Error processing the Request by ShieldSquare module (usually occurs due to timeout)

Example:-
    user:= "sample user"
    result,_:= ss2_go.ValidateRequest(req,call_type,w,user)

About

Radware Bot Manager Go Lang Connector

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages