Author Topic: Lotus Domino INotes and Domino Web Applications  (Read 1334 times)

Offline omicronx9

  • Contributor
  • *
  • Posts: 7
  • Karma: 0
Lotus Domino INotes and Domino Web Applications
« on: January 17, 2012, 08:51:00 PM »
Hello

Has anyone successfully got a Netscaler to work with Domino web applications or inotes in clientless vpn mode on a netscaler ?

I know the issue sits around rewriting URL's but I have very limited knowledge of how to do this.

Offline mkalle

  • VIP Member
  • ***
  • Posts: 25
  • Karma: 1
Re: Lotus Domino INotes and Domino Web Applications
« Reply #1 on: January 18, 2012, 01:56:24 AM »
No, but if you write the URLS you reqeust, and what you want them to be, i'd like to help you with some configuration

Offline omicronx9

  • Contributor
  • *
  • Posts: 7
  • Karma: 0
Re: Lotus Domino INotes and Domino Web Applications
« Reply #2 on: January 18, 2012, 04:53:46 PM »
Hi there many thanks for your reply.  The problem is im not exactly sure what URL's are breaking.  I have run a nstrace from the netscaler and can see the URL's being requested but i cant determine which ones are breaking. 

I cant post the whole capture because there is some sensitive information in the file.  Are there any other tools you could recommend to work out which URL's are breaking ?

Offline omicronx9

  • Contributor
  • *
  • Posts: 7
  • Karma: 0
Re: Lotus Domino INotes and Domino Web Applications
« Reply #3 on: January 18, 2012, 10:12:18 PM »
Ok one my colleagues has experience with webscarab and he was able to work out what URL's were breaking.

%username% = the users mail file being requested (example my username is = gdesilva)

https://mydomain.com.au:443/cvpn/aHR0cDovL21lbG5zMDEucnNtaS5jb20uYXU/mail/%username%.nsf?OpenDatabase"

String to search is:
AAA.sDbUrl=AAA.EuR + '/mail/%username%.nsf';AAA

Rewrite to:

%Netscalersignaturevariable%=/cvpn/hash

AAA.sDbUrl=AAA.EuR + '%Netscalersignaturevariable%/mail/[a-z0-9].nsf';AAA


So now we need to know how to translate that into a netscaler rewrite
« Last Edit: January 18, 2012, 10:39:08 PM by omicronx9 »

Offline mkalle

  • VIP Member
  • ***
  • Posts: 25
  • Karma: 1
Re: Lotus Domino INotes and Domino Web Applications
« Reply #4 on: January 18, 2012, 11:45:21 PM »
Please be very specific about what the source URL and what the DST url is

i assume that the source is

https://mydomain.com.au:443/cvpn/aHR0cDovL21lbG5zMDEucnNtaS5jb20uYXU/mail/gdesilva.nsf?OpenDatabase"


I got no clue on what you want that url rewritten into.
« Last Edit: January 18, 2012, 11:47:34 PM by mkalle »

Offline mkalle

  • VIP Member
  • ***
  • Posts: 25
  • Karma: 1
Re: Lotus Domino INotes and Domino Web Applications
« Reply #5 on: January 19, 2012, 12:01:58 AM »
I created an example on what i thought you ment

GET /cvpn/aHR0cDovL21lbG5zMDEucnNtaS5jb20uYXU/mail/morten.nsf?OpenDatabase HTTP/1.1
rewrites into
GET /cvpn/aHR0cDovL21lbG5zMDEucnNtaS5jb20uYXUnetscalervariable/mail/morten.nsf?OpenDatabase HTTP/1.1


add rewrite policy RP_ex2 "HTTP.REQ.URL.REGEX_MATCH(re\'/cvpn/aHR0cDovL21lbG5zMDEucnNtaS5jb20uYXU/mail/[a-zA-Z0-9]*\\.nsf\\?OpenDatabase\')" RA_ex2
add rewrite action RA_ex2 insert_after "HTTP.REQ.URL.BEFORE_REGEX(re!/mail/[a-zA-Z0-9]*\\.nsf\\?OpenDatabase!)" "\"netscalervariable\""


Offline omicronx9

  • Contributor
  • *
  • Posts: 7
  • Karma: 0
Re: Lotus Domino INotes and Domino Web Applications
« Reply #6 on: January 19, 2012, 05:05:24 PM »
Many thanks for your reply

Just to clarify

The /cvpn/hash is dynamically created by the netscaler and will change on each new request by a user so in the rewrite i would imagine the /cvpn/hash needs to be some form of variable ?  please note where ever i mention /cvpn/hash im refering to the netscaler hash that is used to mask the hostname of the internal server.

The source URL is indeed https://mydomain.com.au:443/cvpn/hash/mail/%username%.nsf?OpenDatabase"

We need to search for the following string in the page that is returned

AAA.sDbUrl=AAA.EuR + 'mail/%username%';AAA

We then need to rewrite AAA.sDbUrl=AAA.EuR + 'mail/%username%.nsf';AAA as

AAA.sDbUrl=AAA.EuR + '/cvpn/hash/mail/[a-z0-9].nsf';AAA  (im not sure if [a-z0-9] is a valid netscaler expression to represent a string match of alphanumeric characters)

I hope this makes sense

« Last Edit: January 19, 2012, 05:35:51 PM by omicronx9 »

Offline mkalle

  • VIP Member
  • ***
  • Posts: 25
  • Karma: 1
Re: Lotus Domino INotes and Domino Web Applications
« Reply #7 on: January 20, 2012, 05:39:54 AM »
i am still not quite sure on what you want.

[a-z0-9] is a vaild regex expression in netscaler.

I did a another example - maybe it can inspire you do to great things on your own :-)
add rewrite action RA_ex2 insert_after "HTTP.REQ.URL.BEFORE_REGEX(re!/mail/[a-zA-Z0-9]*\\.nsf\\?OpenDatabase!)" "HTTP.REQ.URL.REGEX_SELECT(re!^/[a-z]*/[a-zA-Z0-9]*!) + \"netscalervariable\"" -bypassSafetyCheck YES

basically it takes something the orginal request string, and reuses it in the new request.

now the orginal reqeust is
/cvpn/aHR0cDovL21lbG5zMDEucnNtaS5jb20uYXU/mail/morten.nsf?OpenDatabase
after being rewritten:
GET /cvpn/aHR0cDovL21lbG5zMDEucnNtaS5jb20uYXU/cvpn/aHR0cDovL21lbG5zMDEucnNtaS5jb20uYXUnetscalervariable/mail/morten.nsf?OpenDatabase HTTP/1.1

these rewrites can also be done on the response in the body.


Offline omicronx9

  • Contributor
  • *
  • Posts: 7
  • Karma: 0
Re: Lotus Domino INotes and Domino Web Applications
« Reply #8 on: January 22, 2012, 05:32:36 PM »
Hi thanks for taking the time to respond unfortunately what you mentioned above is not quite correct for my requirement. 

I did a little more searching around and found this post here: http://www.netscalerkb.com/netscaler-qa/rewrite-http-response-9-2/msg2354/#msg2354 which is more like what I need.

I still need to understand how to reference the username and the /cvpn/hash as a regular expression in the find and replace areas.

Note: %username% can be any characters and is only referenced here as a place holder

Note: /cvpn/hash is the automatically generated string and will look something like this /cvpn/aHR0cDovL21lbG5zMDEucnNtaS5jb20uYXU/cvpn/aHR0cDovL21lbG5zMDEucnNtaS5jb20uYX
I  found this which might be usable as the variable that represents /cvpn/hash/ = VPN.CLIENTLESS_BASEURL.CVPN_ENCODE (PG 79: http://support.citrix.com/servlet/KbServlet/download/23195-102-647795/NS-PolicyConfig-Guide.pdf)


/////////////I THINK THIS WHAT I NEED///////////

add rewrite policy rw_pol_Lotus_Domino_login "HTTP.RES.BODY(5000).CONTAINS(\"/AAA.sDbUrl=AAA.EuR + 'mail/%username%.nsf';AAA/\")" rw_act_Lotus_Domino_login

add rewrite action rw_act_Lotus_Domino_login replace_all "http.RES.BODY(50000).SET_TEXT_MODE(ignorecase)" "\"AAA.sDbUrl=AAA.EuR + 'cvpn/hash/mail/%username% .nsf';AAA"\"" -search "text(\"AAA.sDbUrl=AAA.EuR + 'mail/%username% .nsf';AAA\")"

bind lb vserver vpn -policyName rw_pol_Lotus_Domino_login -priority 80 -gotoPriorityExpression END -type RESPONSE
« Last Edit: January 23, 2012, 01:05:13 AM by omicronx9 »