Solr
  1. Solr
  2. SOLR-7648

Authorization context should expose remote ip/host

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.2.1, 5.3, 6.0
    • Component/s: None
    • Labels:
      None

      Description

      One of the solutions is to expose the entire servlet request object. Another way is to expose only the remote address/host.

      1. SOLR-7648.patch
        1 kB
        Ishan Chattopadhyaya

        Activity

        Hide
        Ishan Chattopadhyaya added a comment -

        Patch for adding remote address/host to the authorization context object.

        Show
        Ishan Chattopadhyaya added a comment - Patch for adding remote address/host to the authorization context object.
        Hide
        Anshum Gupta added a comment -

        Looking at the java docs for .getRemoteHost(), authorizationContext.getHeader(REMOTE_HOST) should give you just that.

        Show
        Anshum Gupta added a comment - Looking at the java docs for .getRemoteHost(), authorizationContext.getHeader(REMOTE_HOST) should give you just that.
        Hide
        Ishan Chattopadhyaya added a comment -

        I just verified, and getRemoteHost() returns the correct value even when REMOTE_HOST wasn't passed in explicitly.

        Show
        Ishan Chattopadhyaya added a comment - I just verified, and getRemoteHost() returns the correct value even when REMOTE_HOST wasn't passed in explicitly.
        Hide
        Anshum Gupta added a comment -

        I'll commit this. Thanks.

        Show
        Anshum Gupta added a comment - I'll commit this. Thanks.
        Hide
        ASF subversion and git services added a comment -

        Commit 1684299 from Anshum Gupta in branch 'dev/trunk'
        [ https://svn.apache.org/r1684299 ]

        SOLR-7648: Expose remote IP and Host via the AuthorizationContext to be used by the authorization plugin.

        Show
        ASF subversion and git services added a comment - Commit 1684299 from Anshum Gupta in branch 'dev/trunk' [ https://svn.apache.org/r1684299 ] SOLR-7648 : Expose remote IP and Host via the AuthorizationContext to be used by the authorization plugin.
        Hide
        ASF subversion and git services added a comment -

        Commit 1684300 from Anshum Gupta in branch 'dev/branches/branch_5x'
        [ https://svn.apache.org/r1684300 ]

        SOLR-7648: Expose remote IP and Host via the AuthorizationContext to be used by the authorization plugin.(merge from trunk)

        Show
        ASF subversion and git services added a comment - Commit 1684300 from Anshum Gupta in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1684300 ] SOLR-7648 : Expose remote IP and Host via the AuthorizationContext to be used by the authorization plugin.(merge from trunk)
        Hide
        ASF subversion and git services added a comment -

        Commit 1684301 from Anshum Gupta in branch 'dev/branches/lucene_solr_5_2'
        [ https://svn.apache.org/r1684301 ]

        SOLR-7648: Expose remote IP and Host via the AuthorizationContext to be used by the authorization plugin.(merge from branch_5x)

        Show
        ASF subversion and git services added a comment - Commit 1684301 from Anshum Gupta in branch 'dev/branches/lucene_solr_5_2' [ https://svn.apache.org/r1684301 ] SOLR-7648 : Expose remote IP and Host via the AuthorizationContext to be used by the authorization plugin.(merge from branch_5x)

          People

          • Assignee:
            Anshum Gupta
            Reporter:
            Ishan Chattopadhyaya
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development