Cisco CSS - modify http header

hi, i need to modify http hearder with the client IP address. need to modify any of the folowing fields:
1) FROM -> with client IP address
   CLIENT IP -> with Client IP address
2) X-Forwarded-For -> with client IP address
3) REMOTE_ADDR -> with client IP address
please advise how do to modify http header with option 1 or 2 or 3.
Thanks.

Hi Gavin
I think I misread your question.
Question first.  Is your CSS configured with one arm and doing client source natting and the server needs to see the real ip address of the client? Is that the reason why you want to insert x-forward-for header with the clients real IP address?
I did some search with CSS but  the CSS doesn't seem to support this feature.
If you need to see the actual client ip address from the server, then you can do pbr from the router rather than client source natting.
regards
Andrew

Similar Messages

  • Single-Sign-On (SSO) configuration on JAVA Stack through HTTP Header method

    Hello SDN community,
    in the context of a Proof of Concept, we are testing the integration of Microsoft Sharepoint Portal with SAP Backend (addin) systems.
    As the architecture impose use an external scenario (access from the internet), we couldn't use the Kerberos (SPNego) solution and thus we chosed the http header solution which in short uses an intermediary web server (in this case the IIS of the MOSS solution) which will act as authority.
    I miss information on how the workflow works for this http header authentication method. Through the visual administrator of the addin JAVA stack, it is possible to configure each application with a customized authentication (a choice of security modules). But this all that I know.
    My task is to configure SSO. From a sharepoint portal, the user should be able to access Web Dynpros and BSPs. I imagine that the very first call to a webdynpro or bsp (or maybe when we log on the sharepoint portal), the request to the WDP or BSP will first be forwareded by the intermediary server to the JAVA stack (or is it the SAP dispatcher that has to be configured).
    Is there an application to be built on the java stack to deal with the authentication, modify http header?
    What will the Java stack return? a sap long ticket? a token?
    How will the redirect work (to by example a BSP which is in the ABAP stack)?
    SAP preconise to secure with SSL the link between the intermediary web server and the JAVA stack, is IP restriction also a solution?
    A lot of questions about how this SSO http header should work,
    I would be very greatful for any help, or info,
    Kind regards,
    Tanguy Mezzano

    Hi Tanguy,
    to tell you the truth I'm really unsure about what you are trying to achieve. When I started posting to your thread I thought all you wanted was trying to access your J2EE engine via Browser and authenticate against the engine using HTTP Header Variables. Nevermind:
    Here are some answers to your question:
    in fact I did succeed, the problem was that even after domain-relaxation done by the J2EE, I had to change the domain of th SAP cookie to the bbbb.domain.com to be understood (I would have thought that all hosts in/under domain .domain would have accepted such a cookie but it seems that no...).
    The server does not care about the domain because Cookies in an HTTP Request do not contain any domain information. The domain is just important when the Cookie is set by the server so your Client (Browser) will know in which cases the Cookie may be sent or not. So if your domain is xxx.yyy.domain.com and your cookie is issued to .domain.com then your Browser will definitely sent it to all hosts under .domain.com (This includes xxx.yyy.domain.com etc.)
    My current scenario is: in a first request get a SAP Logon Ticket from the Java Stack, then change its domain and then directly call the backend with it.
    You can do that but there is no Client involved in this scenario. So this is useful if you just want to test the functionality (e.g. authentication to J2EE using Header Variables (This works finally!!!) and then use the fetched Logon Ticket to test SSO against any trusted Backend!!)
    So everything's is in a Java Client application without using any redirection.
    If I understand you, you're solution is from the Browser call a servlet (which is deployed on the Java Stack and has no authentication schema) by passing to it our http header.
    No, you should initially authenticate somewhere! I thought that maybe you had some resource you access before accessing the Java Stack. This could be any application (e.g. deployed on a Tomcat or JBOSS or other server or if you like even SAP J2EE). After authenticating there you are aware of the username and could use it to  procceed (e.g. Authenticate against the J2EE using the same user and HTTP Header authentication for that particular user!)
    That servlet will transfer the http header (with the HttpClient app) in order to get from the Java Stack a SAP Logon ticket, and then to redirect to the resource and by sending back the cookie in client browser. Am I correct?
    This was just a suggestion because I realized that there was no Client ever involved in any of your testing (looked strange to me!). I was just thinking that it would be easier for you to just get the Cookie into your Browser so your Browser would do the rest for you (in your case finally send the Logon Ticket Cookie to your Backend to test SSO using Logon Tickets!).
    The AuthenticatorServlet somehow serves as a Proxy to your client because your client is not able to set the Header Variable. That's why I initially suggested to use a Proxy (e.g. Apache) for that purpose. The problem is just that if you use a Proxy you will have to tell it somehow which username it should set in the Header Variable (e.g. using a URL Parameter or using a personalized client certificate and fetch the username (e.g. cn=<username> from the certificate!)
    This way of doing would simplify the calls for sso for each new application needing authentication, instead of having all code each time in it...
    I'm stuck again! Do you want to authenticate an End User or do you want to authenticate an application that needs to call any resources in your Backend that requires authentication?
    So my problem now, is how to call the servlet from the client browser:
    I'm trying to call my servlet from the browser but I don't succeed. I am able to understand how to reach a jsp from the Java Stack, but not to reach a servlet. I don't find the path to my servlet:
    <FORM method="POST" action="SSORedirect2" >
    A JSP is a servlet too. There is just no JAVA Class involved!
    You do not need any POST Request to invoke a Servlet.
    I see that my servlet is deployed, but I don't how what path to give to my form to invoke the servlet, here follows my web.xml
      <?xml version="1.0" encoding="UTF-8" ?>
      <!DOCTYPE web-app (View Source for full doctype...)>
    - <web-app>
      <display-name>WEB APP</display-name>
      <description>WEB APP description</description>
    - <servlet>
      <servlet-name>SSOredirect2</servlet-name>
      <servlet-class>com.atosorigin.examples.AuthenticatorServlet</servlet-class>
      </servlet>
    - <servlet>
      <servlet-name>SSORedirect2.jsp</servlet-name>
      <jsp-file>/SSORedirect2.jsp</jsp-file>
      </servlet>
    - <security-constraint>
      <display-name>SecurityConstraint</display-name>
    - <web-resource-collection>
      <web-resource-name>WebResource</web-resource-name>
      <url-pattern>/*</url-pattern>
      <http-method>GET</http-method>
      <http-method>POST</http-method>
      </web-resource-collection>
    - <auth-constraint>
      <role-name>DefaultSecurityRole</role-name>
      </auth-constraint>
      </security-constraint>
    - <security-role>
      <role-name>DefaultSecurityRole</role-name>
      </security-role>
      </web-app>
    If you have an AuthenticatorServlet Class all you need is to add the Servlet Mapping in your web.xml file
    e.g.
    <servlet>
      <description>
      </description>
      <display-name>AuthenticatorServlet</display-name>
      <servlet-name>AuthenticatorServlet</servlet-name>
      <servlet-class>com.atosorigin.examples.AuthenticatorServlet</servlet-class>
    </servlet>
    <servlet-mapping>
      <servlet-name>AuthenticatorServlet</servlet-name>
      <url-pattern>/AuthenticatorServlet</url-pattern>
    </servlet-mapping>
    You can directly call the Servlet in your Browser by calling the URL provided in the url-pattern of your Servlet mapping ( in this case /AuthenticatorServlet). The engine will invoke the Class "com.atosorigin.examples.AuthenticatorServlet" in the background and do whatever you defined there!
    I have also to pass my http header and the redirectUrl in the GET request.
    If you like! I just suggested this for testing purposes. As I stated before you need a way to tell your proxy (or in your case AuthenticatorServlet) which user should be set when calling the Engine in order to authenticate using HTTP Header. You could use the URL Paramater to define the user you actually want to use when you set the Header Variable.
    I just introduced the redirectURL because you were talking about redirects all the time. So if you finally want to call the Backend you could define the Backend URL in the redirectURL Parameter and the Servlet will make sure that you are redirected to this location after the whole process!
    Thx for your input very helpful,
    But again 0 points
    Cheers

  • Cisco css http keepalive is not working with GET command

    Dear all
    i have Cisco Css connected to Dell Server (via switch)
    Cisco CSS - 192.168.1.3 and Dell Server - 192.168.1.5
    Dell server is setup with windows 2009R2 and Apache HTTPD is version 2.2
    This server is dedicated to host multiple doamins with Apache lik
    www.abc.co.uk
    www.xyz.co.uk
    Now the clinet wants to setup the http keepalive  with specfic web page like /testpage.html  for all these domains. i have teseed with single URI. it is working the comamnds are
    config)# service serv1
    (config-service[serv1])# ip address 192.168.1.5
    (config-service[serv1])# keepalive type http
    (config-service[serv1])# keepalive method head    ( get i have not used due to hash mismatch with apche server, if i use GET it is not working)
    (config-service[serv1])# keepalive uri "/testpage.html"
    (config-service[serv1])# active
    It is working with single URI.  but how can i do the same thing for multiple doamins ?
    for multiple doamins do i need use script ? or can i use with commands ?
    if i need to use script the script is
    !no echo
    ! Filename: httptag-test
    ! Parameters: HostName WebPage HostTag
    ! Description:
    !       This script will connect to the remote host and do an HTTP
    !   GET method upon the web page that the user has asked for.
    !   This script also adds a host tag to the GET request.
    ! Failure Upon:
    !   1. Not establishing a connection with the host.
    !       2. Not receiving an HTTP status "200 OK"
    if ${ARGS}[#] "NEQ" "3"
            echo "Usage: httptag-test \'Hostname WebPage HostTag\'"
            exit script 1
    endbranch
    ! Defines:
    set HostName "${ARGS}[1]"
    set WebPage "${ARGS}[2]"
    set HostTag "${ARGS}[3]"
    ! Connect to the remote Host
    set EXIT_MSG "Connection Failure"
    socket connect host ${HostName} port 80 tcp
    ! Send the GET request for the web page
    set EXIT_MSG "Send: Failed"
    socket send ${SOCKET} "GET ${WebPage} HTTP/1.1\nHost: ${HostTag}\n\n"
    ! Send the HEAD request for the web page
    set EXIT_MSG "Send: Failed"
    socket send ${SOCKET} "HEAD ${WebPage} HTTP/1.1\nHost: ${HostTag}\n\n"
    ! Wait for a good status code
    set EXIT_MSG "Waitfor: Failed"
    socket waitfor ${SOCKET} "200 OK"
    no set EXIT_MSG
    socket disconnect ${SOCKET}sh w
    exit script 0
    in the script i have not used GET becasue, when CSS send GET request to apache it use hash, but apache is not able to respond with same hash and it shows that website is down. more information- click below url
    http://www.cisco.com/en/US/docs/app_ntwk_services/data_center_app_services/css11500series/v7.40/command/reference/CmdKeepC.html#wp1139668
    (config-keepalive) method
    I have uploaded in CSS with httptag-test file and applied these commands
    service comp.brit.co.uk-80
      keepalive port 80
      ip address 192.168.1.5
      keepalive frequency 10
    keepalive maxfailure 2
    keepalive retryperiod 10
    keepalive type script httptag-test "192.168.1.5 /testpage.html  www.abc.co.uk
    keepalive type script httptag-test "192.168.1.5 /testpage.html  www.xyz.co.uk
    but this script is not working
    my question is:
    1.do i need use script only to setup http keepalvie with webpage for multiple domains ?
    2.with out using script is there any solution like CICSCO  CSS commands  to setup http uril for multiple domains which are on 1 singl server.
    please help me asap

    Hello Muhammad,
    If you wish to use multiple domains for a URI  keep-alive check, and perform a HEAD request what Daniel mentioned is  correct.  You have to use a scripted keep-alive check on the service.  However, you should not use the default "ap-kal-httptag" script to do so  as it's limited to only 1 website (unless you modify the script).  You're best bet would be using the "ap-kal-httplist" script on the CSS  as it allows the checking of 2 different websites along with a webpage  to check for each site using HTTP HEAD method.
    !no echo
    ! Filename: ap-kal-httplist
    ! Parameters: Site1 WebPage1 Site2 WebPage2 [...]
    ! Description:
    !    This script will connect a list of sites/webpage pairs.  The
    !   user must simply supply the site, and then the webpage and
    !   we'll attempt to do an HTTP HEAD on that page.
    ! Failure Upon:
    !   1. Not establishing a connection with the host.
    !   2. Not receiving a status code 200 on the HEAD request on any
    !      one site.  If one fails, the script fails.
    ! Make sure the user has a qualified number of arguments
    if ${ARGS}[#] "LT" "2"
            echo "Usage: ap-kal-httplist \'WebSite1 WebPage1 WebSite2 WebPage2 ...'"
            exit script 1
    endbranch
    while ${ARGS}[#] "GT" "0"
            set Site "${ARGS}[1]"
        var-shift ARGS
        if ${ARGS}[#] "==" "0"
            set EXIT_MSG "Parameter mismatch: hostname present but webpage was not"
            exit script 1
        endbranch
        set Page "${ARGS}[1]"
        var-shift ARGS
        no set EXIT_MSG
        function HeadUrl call "${Site} ${Page}"
    endbranch
    exit script 0
    function HeadUrl begin
    ! Connect to the remote Host
    set EXIT_MSG "Connect: Failed to connect to ${ARGS}[1]"
    socket connect host ${ARGS}[1] port 80 tcp 2000
    ! Send the head request
    set EXIT_MSG "Send: Failed to send to ${ARGS}[1]"
    socket send ${SOCKET} "HEAD ${ARGS}[2] HTTP/1.0\n\n"
    ! Wait for the status code 200 to be given to us
    set EXIT_MSG "Waitfor: Failed to wait for '200' on ${ARGS}[1]"
    socket waitfor ${SOCKET} " 200 " 2000
    no set EXIT_MSG
    socket disconnect ${SOCKET}
    function HeadUrl end
    Rather  then modify the default "ap-kal-httplist" script on the CSS I would  simply define the arguments within the service configuration itself.   Something like the following (using your service example):
    service dell-192.168.1.5
    ip address 192.168.1.5
    keepalive type script ap-kal-httplist "www.abc.co.uk /testpage.html www.xyz.co.uk /testpage.html"
    active
    As  long as the server is configured to reply to host headers, and the page  is configured to retuen a "200 OK" the above service configuration  should work. If there are any errors simply run "show service  " to view why there was a failure. If there is a  failure, and the output from the command specified shows a line number  run the following command against the script to view at what point  (line) did the failure occur:
    show script ap-kal-httplist line-numbers
    Hope this helps!
    - Jason Espino

  • CSS SSL Proxy - how can I write the original source address in http header

    I'm replacing some BigIP's with CSS11500's that are configured to do front/backend ssl proxying in a one-armed configuration. The BigIP's write the original source IP address as a http header value when the traffic is sent to the application, and the application uses the IP to match against an application ACL. How can I do the same in the CSS.
    thanks,
    Brian

    here is what you can insert with the SSL module :
    http://www.cisco.com/en/US/products/hw/contnetw/ps792/products_configuration_guide_chapter09186a0080292a76.html#wp1027619
    Gilles.

  • Css stickiness based on the http header

    there is CSS 11503 that should load balances the traffic between 2 servers running IIS (http port 80). In front of load balancer there is a reverse proxy, that hides all real ip addresses of users that send requests to web-servers.
    The customer would like to have stickiness per user. The reverse proxy can add user real ip address to http header.
    What kind of load balancing mechanism is better to use  to fulfill customer requirements? HTTP load balancing? If "yes", are there standard field-types that is possible to use?

    You can't do sticky on http header in CSS , best solution is to insert a cookie for stickyness, individula clients will get a cookie and will stick based on cookie ppresented.
    see:
    http://www.cisco.com/en/US/docs/app_ntwk_services/data_center_app_services/css11500series/v8.20/configuration/content_lb/guide/Sticky.html#wp1109390
    content testing
    vip address 192.168.128.131
    add service s1
    advanced-balance arrowpoint-cookie
    active

  • Using the if-modified since http header

    I've a few questions regarding this header.
    1/ What is the point in using this header? Does it help with page ranking/hits?
    2/ Is if useful for static html pages or just for dynamic ones?
    3/ If it is useful for static pages, how do you add it? I.e exactly what code needs to added to the header? There seems to be quite a lot of discussion on the web about the merits or not of using this, but no examples of what code needs to be added.
    Any ideas?

    I hacked the Servlet myself so that it honors the if-modified-since header and returns HTTP-304 if the cached version is still ok.
    lg Clemens

  • If-Modified-Since HTTP Header

    Does anyone know if BC supports the if-modified-since http header? If it doesn't - how to add it to a BC webpage?
    In google guideline for SEo it states:
    Make sure your web server supports the If-Modified-Since HTTP header. This feature allows your web server to tell Google whether your content has changed since we last crawled your site. Supporting this feature saves you bandwidth and overhead.
    Thanks.

    I hacked the Servlet myself so that it honors the if-modified-since header and returns HTTP-304 if the cached version is still ok.
    lg Clemens

  • Cisco CSS as non-HTTPS SSL-traffic terminator

    Hi!
    Does anybody know is it real to use Cisco CSS as SSL-traffic terminator. I need to terminate non-HTTPS SSL-traffic on this device (i.e. SSL-encrypted sessions of any particular TCP-based application-layer protocol, not https)? If not, is there any CISCO device capable of doing such a job?
    Regards, Amir

    Hi!
    Thank you very much for your reply.
    I know about the S model - as per my post - but unfortunately I have realized after making the purchase.
    Can you please help me with the following issue: my unit is not able to boot from FTP, even if I follow up the CISCO official documentation for that version (I issue all the commands as in the manual). More than that, if I setup the Primary Boot Configuration and then I want to check it up there is nothing in that field. The Secondary Boot Configuration keeps its settings and after the Primary failure it will try the Network Booting but with Failed status - returning me to the OffDM.
    I mention that I am using the OffDM because the unit I bought has no Flash Card.
    Also I am not sure how can I have a "network mounted filesystem" and in the meantime to use the FTP protocol;  setting up a NFS server wont provide me with Windows style absolute path like k:/.... as per CISCO official guide. Is that a plain-ftp generically called as Network File System??? "First, create these subdirectories on the FTP server, then copy the files from the boot image to the subdirectories"
    Is this linked with the fact that I am using a Linux box for my FTP Server? Can you please help me to understand what the following line from CISCO official guide means "A network boot is not supported on UNIX workstations"
    Thank you!

  • XML HTTP Header modify

    Hi,
    In my scenario I am calling a WebService. But when calling I am told to add the message ID also to the http header of the request XML message. Now, I am thinking about the possible options to add it to the HTTP Header.
    I am taking the Message ID from proxy as a field and have to add it to the http header of the soap message.
    System: PI 7.0 SP 16
    Thank you for your replies.
    Arman

    Yes. I see it is not part of the online help. You can see the ASMA fields in the online help for the SOAP sender adapter. They are the same for the receiver adapter. You should see it in the communiacation channel.
    Regards
    Stefan

  • Javafx media component can not modify the http header. javafx media component can not append parameter in url such as m3u8?channel=2

    1. When our HLS stream server check user name and password. In http header such as the cookies value. There are not place for it.
    2. The mp4 can append ?parameter=value. But m3u8 can not be appended.

    1. When our HLS stream server check user name and password. In http header such as the cookies value. There are not place for it.
    2. The mp4 can append ?parameter=value. But m3u8 can not be appended.

  • Safari seems not sending If-Modified-Since header for main address

    Not sure I'm in the appropriate forum but let's try (if there is more appropriate one please advise).
    When Safari requests a resource (page, image...) to a web server it doesn't provide If-Modified-Since header for the main resource of the request. That means the web server can't answer "resource not modified, use your cache". This is not the behavior of other browsers and not good in terms of performance for the web server as well as for the user.
    However Safari sends this If-Modified-Since for the sub-elements of the resource (e.g. images, css in a page...). Which is good.
    Is there a way to influence Safari's behavior to provide a If-Modified-Since for the main resource requested to the server?
    acama,

    Found out the answer.  IIS 6 does in fact steal "If-Modified-Since" and "If-None-Match" headers, but only on custom 404 redirects.  That's actually what I'm doing here (that'll teach me not to put details in a question when I think they're irrelevant -- actually I just forgot).
    Here's two discussions on the issue (they're using ASP, but apparently it's the same for ColdFusion):
    http://www.eggheadcafe.com/conversation.aspx?messageid=32839787&threadid=32839787
    http://www.webmasterworld.com/microsoft_asp_net/3935439.htm

  • Load balance traffic to a service based on a added field in the HTTP Header

    I am trying to use HTTP Header Load balancing but the field we want to use in order to load balance is "user-defined", example HTTP_TOTO = toto1.
    Do you have any idea on how I could perform this ?
    Thanks in advance

    Load balancing using pre-defined headers is supported. Not sure if load balancing using user defined fields is possible. You could refer to the following document.
    http://www.cisco.com/univercd/cc/td/doc/product/webscale/css/css_710/bsccfggd/httphead.htm
    We would appreciate it if someone could share their experience if they know more about this.

  • ACE One-Arm Source-NAT HTTP Header Insert

    Hellow ACE Gurus,
    This is probably a dumb question but I'm looking for info on HTTP Header Insert for SSL sessions.  Does the HTTP header re-write action list work for SSL traffic?  I guess I'm not clear on whether or not the header is encrypted and if the ACE can modify on an HTTPS session.  Any input would be greatly appreciated.
    /r
    Rob

    Hi Rob,
    When using HTTPS, all the data is encrypted, including the HTTP headers.
    In such a situation, if you want to insert headers (or do any other kind of L7 processing), you will have to configure the ACE to do SSL termination. Once the connection is decrypted, the ACE can do any processing it needs before sending the connection towards the server either in clear text or again using HTTPS.
    I would recommend you to have a look at the link below. This is an example of how to configure an ACE for end-to-end SSL (so, HTTPS on both sides of the ACE). In the example, the only L7 processing that is being done is matching on the URL, but it would be enough to replace that part with whatever header insertion commands you need
    http://www.cisco.com/en/US/partner/products/hw/modules/ps2706/products_configuration_example09186a00809c6f37.shtml
    If you still need more help to understand any of the points involved in the process, please, do not hesitate to contact me again.
    Regards
    Daniel

  • ACE: wrong IP in HTTP header HEALTHCHECK packet

    Hi,
    I encounter a strange problem with ACE when the blade performs a HTTP healthcheck towards a RSERVER.
    Sometimes, ACE insert in the HTTP header a strange IP address, others then the IP address of the rserver, for which it performs a healthcheck.
    Anyone encountered the same problem?
    Thx, Wim

    Hi Gillis,
    I reported this issue to our integrator. I think they will open a cisco case right now.
    We are able to reproduce this problem. So, that might not be the problem to troubleshoot at this moment.
    For your information, we had version A1.6 running until last week. Now, we upgraded to A2, but the healthcheck issue is still present.
    I assume you 'll informed via the support case?

  • Adding port in http header information??

    I have a standard HTTPS to HTTP conversion going through a CSS 11506. The CSS terminates the SSL and then passes the cleartext traffic to the backend server via port 8011. The backend server receives this traffic on port 8011 but the http header does not specify port 8011 at the end of the url (e.g. http://mywebsite.com:8011/content but only passes through http://mysebsite.com/content). The backend server thinks this traffic has come in on port 80 and reports a 302 error (redirect). Is there some way the CSS can add the :8011 port number into the http header for all traffic bound to the backend server?
    Many thanks,
    Frank

    No, there is no way to add the port to the host info.
    You can run 2 different instances of the server - each one on its own port - so they don't need to verify the port inside the http request.
    Gilles.

Maybe you are looking for

  • How do I reset a RAW file to it's original settings?

    Hello [I use PS CS3 (Although I have access to CS4) and an intel imac] I want to keep my RAW files unadulterated, in the state that they were shot, so that I can return to them at a later date to 'play' again, with a fresh point of view. However, whe

  • IOS 6.1.3 WIFI button disable problem on iPhone4S - It is definitely a BUG

    Hi Apple Fans I have a full house of Apple products from iPhone -> iPAD -> iPod -> Mac -> AirPort, and I am suffering from WIFI button disable problem after upgrade to iOS 6.1.3, without any clue after calling Apple Support, factory reset and reload

  • Launch one CS app from another

    Hi all, Newbie alert - sorry! I am currently stuck on something that seems simple, but I cannot get it to work - it's about coordinating between multiple CS apps. I want to cause one Creative Suite app (e.g. Photoshop) open a certain document (say a

  • How can I add the iPad cover lock option to the iPad 2?

    The iPad cover lock option doesn't come up on my settings on my iPad 2. How can I add it?

  • Actual dates in Marketing Calender

    Hello, I need to display the actual campaign dates in the marketing calendar but it is showing the planned date...I can't seem to find a way to switch to the actual dates....how can I do it?