Re: Shiro log responded differently when access server via hostname and ip address.

2016-09-21 Thread iGem
Hiya Brian, 1st of all thank you for replying me query.

I've found the problem. 

Assuming abc is my project domain.
If I enter the url as 

https:///abc

shiro will redirect me to login page with a sessionid appended at the back
of the url 

https:///abc/login.jsp;jsessionid=A616F4CA137E107FB35515D115C03158 

If I proceed to login, I'll end up being redirected back to login page.



If I enter the url as 

https:///abc*/* [ends with a / at the back], 

shiro will redirect me to login page WITHOUT a sessionid appended at the
back

https:///abc/login.jsp

If I process to login, I'm able to login to my project.

Is this how it's suppose to react ?


iGem wrote
> I've been doing some debugging and I found that I can't login to the
> system ONLY when I defined ssl Filter as 1 of my filterChains. as shown
> below.
> iGem wrote
>>  
>> > class="org.apache.shiro.spring.web.ShiroFilterFactoryBean">
>>  
>> 
>>  
>> 
>>  
>> 
>>  
>>  
>> 
>>  
>> 
>>  /resources/** = anon
>>  /** = ssl, authc
>>  
>> 
>>  
>> 
>>  
>> 
> IF i remove the ssl filterChain (set /** = authc), I CAN access to my
> system with both ip and hostname. Is there anything else I need to
> configure if I use ssl filter chain ?
> 
> 
> 
> iGem wrote
>> Hiya Brian:
>> 
>> Please advice how to provide u sample app. As in post it in github ? or
>> post shiro configuration in here ?
>> 
>> Have you tried with ur shiro app with ip and hostname ? and you can login
>> without any problem ?
>> 
>> I'm guessing if I'm the only one having this issue maybe it's my setup
>> problem them.
>> Brian Demers wrote
>>> Any chance you have a sample app to help us look into it?
>>> 
>>> On Tue, Sep 20, 2016 at 10:26 PM, iGem <

>>> lwt.gemini@

>>> > wrote:
>>> 
>>>> Hiya Brian Demers:
>>>>
>>>> I'm using google Chrome browser. Results remain unchanged when I tried
>>>> to
>>>> access to server using ip via pc. I've also cleared the cookies and
>>>> results
>>>> remain no change. Still can't login to server using ip address.
>>>>
>>>>
>>>> Brian Demers wrote
>>>> > What browser are you using on your phone? Does it support cookies ? 
>>>> What
>>>> > happens when you access the IP from a PC ?
>>>> > On your desktop, if you clear your cookies do you get the same result
>>>> ?
>>>> >
>>>> > On Mon, Sep 19, 2016 at 11:22 PM, iGem <
>>>>
>>>> > lwt.gemini@
>>>>
>>>> > > wrote:
>>>> >
>>>> >> I've successfully integrated shiro into my spring mvc project and
>>>> has
>>>> >> been
>>>> >> really happy and impressed with shiro. However I've encountered the
>>>> a
>>>> >> road
>>>> >> block which I've been trying to fix for the passed few days with no
>>>> >> success.
>>>> >>
>>>> >> Since I'm developing on pc I've always type https://localhost/
>>>> for
>>>> >> testing purposes... until there's a section where I need to test it
>>>> on
>>>> >> mobile. So I pulled out my android phone connect to the same network
>>>> as
>>>> >> my
>>>> >> server via wifi and typed in the url https://192.168.1.10/
>>>> > 
>>> 
>>>> >> to
>>>> >> test.
>>>> >>
>>>> >> Server shows me the login page and when I typed in username and
>>>> password
>>>> >> and
>>>> >> hit enter, I'm seeing the login page again which initially I thought
>>>> I
>>>> >> entered the username and password incorrect. But After a few
>>>> attempts
>>>> the
>>>> >> result remains the same, I'm still seeing the login page only.
>>>> >>
>>>> >> After checking the log file I see that when access server via IP,
>>>> even
>>>> >> though I entered the correct username and password, I'm being
>>>> redirec

Re: Shiro log responded differently when access server via hostname and ip address.

2016-09-21 Thread iGem
Hiya Brian, thank you for your responding to my thread.

I managed to narrow down the cause (eye sores after countless of logs)
lol...  I did not set successUrl and was using the default ("/") values..
and it's causing this problem. Somehow even I've successfully login, it
still redirect me back to login.jsp page.

Even if I've added ** the end results
remains unchanged.

I noticed when I tried login once, which system bounce me back to login page
and I manually change the uri to 1 of the system uri path. At 1st it still
redirects me to login page (1 more time) but after I login successfully I
can get see the correct page for that uri I entered.

I have to set *"/>* in order to access my project.

Still I have no clue as why it is reacting like this. The redirection was
flawless when testing using non ssl.

Any idea ? ;p

I'm really happy and impressed with shiro when integrating into my system.
Didn't regret choosing shiro over other security framework ;p


iGem wrote
> I've been doing some debugging and I found that I can't login to the
> system ONLY when I defined ssl Filter as 1 of my filterChains. as shown
> below.
> iGem wrote
>>  
>> > class="org.apache.shiro.spring.web.ShiroFilterFactoryBean">
>>  
>> 
>>  
>> 
>>  
>> 
>>  
>>  
>> 
>>  
>> 
>>  /resources/** = anon
>>  /** = ssl, authc
>>  
>> 
>>  
>> 
>>  
>> 
> IF i remove the ssl filterChain (set /** = authc), I CAN access to my
> system with both ip and hostname. Is there anything else I need to
> configure if I use ssl filter chain ?
> 
> 
> 
> iGem wrote
>> Hiya Brian:
>> 
>> Please advice how to provide u sample app. As in post it in github ? or
>> post shiro configuration in here ?
>> 
>> Have you tried with ur shiro app with ip and hostname ? and you can login
>> without any problem ?
>> 
>> I'm guessing if I'm the only one having this issue maybe it's my setup
>> problem them.
>> Brian Demers wrote
>>> Any chance you have a sample app to help us look into it?
>>> 
>>> On Tue, Sep 20, 2016 at 10:26 PM, iGem <

>>> lwt.gemini@

>>> > wrote:
>>> 
>>>> Hiya Brian Demers:
>>>>
>>>> I'm using google Chrome browser. Results remain unchanged when I tried
>>>> to
>>>> access to server using ip via pc. I've also cleared the cookies and
>>>> results
>>>> remain no change. Still can't login to server using ip address.
>>>>
>>>>
>>>> Brian Demers wrote
>>>> > What browser are you using on your phone? Does it support cookies ? 
>>>> What
>>>> > happens when you access the IP from a PC ?
>>>> > On your desktop, if you clear your cookies do you get the same result
>>>> ?
>>>> >
>>>> > On Mon, Sep 19, 2016 at 11:22 PM, iGem <
>>>>
>>>> > lwt.gemini@
>>>>
>>>> > > wrote:
>>>> >
>>>> >> I've successfully integrated shiro into my spring mvc project and
>>>> has
>>>> >> been
>>>> >> really happy and impressed with shiro. However I've encountered the
>>>> a
>>>> >> road
>>>> >> block which I've been trying to fix for the passed few days with no
>>>> >> success.
>>>> >>
>>>> >> Since I'm developing on pc I've always type https://localhost/
>>>> for
>>>> >> testing purposes... until there's a section where I need to test it
>>>> on
>>>> >> mobile. So I pulled out my android phone connect to the same network
>>>> as
>>>> >> my
>>>> >> server via wifi and typed in the url https://192.168.1.10/
>>>> > 
>>> 
>>>> >> to
>>>> >> test.
>>>> >>
>>>> >> Server shows me the login page and when I typed in username and
>>>> password
>>>> >> and
>>>> >> hit enter, I'm seeing the login page again which initially I thought
>>>> I
>>>> >> entered the username and password incorrect. But After a few
>>>> attempts
>>>> the
>&

Re: Shiro log responded differently when access server via hostname and ip address.

2016-09-21 Thread iGem
I've been doing some debugging and I found that I can't login to the system
ONLY when I defined ssl Filter as 1 of my filterChains. as shown below.


iGem wrote
>   
>  class="org.apache.shiro.spring.web.ShiroFilterFactoryBean">
>   
> 
>   
> 
>   
> 
>   
>   
> 
>   
> 
>   /resources/** = anon
>   /** = ssl, authc
>   
> 
>   
> 
>   
> 

IF i remove the ssl filterChain (set /** = authc), I CAN access to my system
with both ip and hostname. Is there anything else I need to configure if I
use ssl filter chain ?





iGem wrote
> Hiya Brian:
> 
> Please advice how to provide u sample app. As in post it in github ? or
> post shiro configuration in here ?
> 
> Have you tried with ur shiro app with ip and hostname ? and you can login
> without any problem ?
> 
> I'm guessing if I'm the only one having this issue maybe it's my setup
> problem them.
> Brian Demers wrote
>> Any chance you have a sample app to help us look into it?
>> 
>> On Tue, Sep 20, 2016 at 10:26 PM, iGem <

>> lwt.gemini@

>> > wrote:
>> 
>>> Hiya Brian Demers:
>>>
>>> I'm using google Chrome browser. Results remain unchanged when I tried
>>> to
>>> access to server using ip via pc. I've also cleared the cookies and
>>> results
>>> remain no change. Still can't login to server using ip address.
>>>
>>>
>>> Brian Demers wrote
>>> > What browser are you using on your phone? Does it support cookies ? 
>>> What
>>> > happens when you access the IP from a PC ?
>>> > On your desktop, if you clear your cookies do you get the same result
>>> ?
>>> >
>>> > On Mon, Sep 19, 2016 at 11:22 PM, iGem <
>>>
>>> > lwt.gemini@
>>>
>>> > > wrote:
>>> >
>>> >> I've successfully integrated shiro into my spring mvc project and has
>>> >> been
>>> >> really happy and impressed with shiro. However I've encountered the a
>>> >> road
>>> >> block which I've been trying to fix for the passed few days with no
>>> >> success.
>>> >>
>>> >> Since I'm developing on pc I've always type https://localhost/
>>> for
>>> >> testing purposes... until there's a section where I need to test it
>>> on
>>> >> mobile. So I pulled out my android phone connect to the same network
>>> as
>>> >> my
>>> >> server via wifi and typed in the url https://192.168.1.10/
>>> > 
>> 
>>> >> to
>>> >> test.
>>> >>
>>> >> Server shows me the login page and when I typed in username and
>>> password
>>> >> and
>>> >> hit enter, I'm seeing the login page again which initially I thought
>>> I
>>> >> entered the username and password incorrect. But After a few attempts
>>> the
>>> >> result remains the same, I'm still seeing the login page only.
>>> >>
>>> >> After checking the log file I see that when access server via IP,
>>> even
>>> >> though I entered the correct username and password, I'm being
>>> redirected
>>> >> to
>>> >> login.jsp again. This doesn't happened if I use hostname or
>>> localhost.
>>> >>
>>> >> I'm attaching an ss showing the different in log when access using
>>> >> localhost
>>> >> (log on left) and using ipaddress (log on right). I've highlighted
>>> the
>>> >> log
>>> >> with red color line.
>>> >>
>>> >> <http://shiro-user.582556.n2.nabble.com/file/n7581268/
>>> shiro-log.png>
>>> >>
>>> >> Any idea why shiro respond differently ?
>>> >>
>>> >>
>>> >>
>>> >> --
>>> >> View this message in context: http://shiro-user.582556.n2.
>>> >> nabble.com/Shiro-log-responded-differently-when-
>>> >> access-server-via-hostname-and-ip-address-tp7581268.html
>>> >> Sent from the Shiro User mailing list archive at Nabble.com.
>>> >>
>>>
>>>
>>>
>>>
>>>
>>> --
>>> View this message in context: http://shiro-user.582556.n2.
>>> nabble.com/Shiro-log-responded-differently-when-
>>> access-server-via-hostname-and-ip-address-tp7581268p7581273.html
>>> Sent from the Shiro User mailing list archive at Nabble.com.
>>>





--
View this message in context: 
http://shiro-user.582556.n2.nabble.com/Shiro-log-responded-differently-when-access-server-via-hostname-and-ip-address-tp7581268p7581277.html
Sent from the Shiro User mailing list archive at Nabble.com.


Re: Shiro log responded differently when access server via hostname and ip address.

2016-09-21 Thread iGem
Hiya Brian:

Please advice how to provide u sample app. As in post it in github ? or post
shiro configuration in here ?

Have you tried with ur shiro app with ip and hostname ? and you can login
without any problem ?

I'm guessing if I'm the only one having this issue maybe it's my setup
problem them.


Brian Demers wrote
> Any chance you have a sample app to help us look into it?
> 
> On Tue, Sep 20, 2016 at 10:26 PM, iGem <

> lwt.gemini@

> > wrote:
> 
>> Hiya Brian Demers:
>>
>> I'm using google Chrome browser. Results remain unchanged when I tried to
>> access to server using ip via pc. I've also cleared the cookies and
>> results
>> remain no change. Still can't login to server using ip address.
>>
>>
>> Brian Demers wrote
>> > What browser are you using on your phone? Does it support cookies ? 
>> What
>> > happens when you access the IP from a PC ?
>> > On your desktop, if you clear your cookies do you get the same result ?
>> >
>> > On Mon, Sep 19, 2016 at 11:22 PM, iGem <
>>
>> > lwt.gemini@
>>
>> > > wrote:
>> >
>> >> I've successfully integrated shiro into my spring mvc project and has
>> >> been
>> >> really happy and impressed with shiro. However I've encountered the a
>> >> road
>> >> block which I've been trying to fix for the passed few days with no
>> >> success.
>> >>
>> >> Since I'm developing on pc I've always type https://localhost/ for
>> >> testing purposes... until there's a section where I need to test it on
>> >> mobile. So I pulled out my android phone connect to the same network
>> as
>> >> my
>> >> server via wifi and typed in the url https://192.168.1.10/
>> > 
> 
>> >> to
>> >> test.
>> >>
>> >> Server shows me the login page and when I typed in username and
>> password
>> >> and
>> >> hit enter, I'm seeing the login page again which initially I thought I
>> >> entered the username and password incorrect. But After a few attempts
>> the
>> >> result remains the same, I'm still seeing the login page only.
>> >>
>> >> After checking the log file I see that when access server via IP, even
>> >> though I entered the correct username and password, I'm being
>> redirected
>> >> to
>> >> login.jsp again. This doesn't happened if I use hostname or localhost.
>> >>
>> >> I'm attaching an ss showing the different in log when access using
>> >> localhost
>> >> (log on left) and using ipaddress (log on right). I've highlighted the
>> >> log
>> >> with red color line.
>> >>
>> >> <http://shiro-user.582556.n2.nabble.com/file/n7581268/
>> shiro-log.png>
>> >>
>> >> Any idea why shiro respond differently ?
>> >>
>> >>
>> >>
>> >> --
>> >> View this message in context: http://shiro-user.582556.n2.
>> >> nabble.com/Shiro-log-responded-differently-when-
>> >> access-server-via-hostname-and-ip-address-tp7581268.html
>> >> Sent from the Shiro User mailing list archive at Nabble.com.
>> >>
>>
>>
>>
>>
>>
>> --
>> View this message in context: http://shiro-user.582556.n2.
>> nabble.com/Shiro-log-responded-differently-when-
>> access-server-via-hostname-and-ip-address-tp7581268p7581273.html
>> Sent from the Shiro User mailing list archive at Nabble.com.
>>





--
View this message in context: 
http://shiro-user.582556.n2.nabble.com/Shiro-log-responded-differently-when-access-server-via-hostname-and-ip-address-tp7581268p7581276.html
Sent from the Shiro User mailing list archive at Nabble.com.


Re: Shiro log responded differently when access server via hostname and ip address.

2016-09-21 Thread Brian Demers
Any chance you have a sample app to help us look into it?

On Tue, Sep 20, 2016 at 10:26 PM, iGem  wrote:

> Hiya Brian Demers:
>
> I'm using google Chrome browser. Results remain unchanged when I tried to
> access to server using ip via pc. I've also cleared the cookies and results
> remain no change. Still can't login to server using ip address.
>
>
> Brian Demers wrote
> > What browser are you using on your phone? Does it support cookies ?  What
> > happens when you access the IP from a PC ?
> > On your desktop, if you clear your cookies do you get the same result ?
> >
> > On Mon, Sep 19, 2016 at 11:22 PM, iGem <
>
> > lwt.gemini@
>
> > > wrote:
> >
> >> I've successfully integrated shiro into my spring mvc project and has
> >> been
> >> really happy and impressed with shiro. However I've encountered the a
> >> road
> >> block which I've been trying to fix for the passed few days with no
> >> success.
> >>
> >> Since I'm developing on pc I've always type https://localhost/ for
> >> testing purposes... until there's a section where I need to test it on
> >> mobile. So I pulled out my android phone connect to the same network as
> >> my
> >> server via wifi and typed in the url https://192.168.1.10/
> > 
> >> to
> >> test.
> >>
> >> Server shows me the login page and when I typed in username and password
> >> and
> >> hit enter, I'm seeing the login page again which initially I thought I
> >> entered the username and password incorrect. But After a few attempts
> the
> >> result remains the same, I'm still seeing the login page only.
> >>
> >> After checking the log file I see that when access server via IP, even
> >> though I entered the correct username and password, I'm being redirected
> >> to
> >> login.jsp again. This doesn't happened if I use hostname or localhost.
> >>
> >> I'm attaching an ss showing the different in log when access using
> >> localhost
> >> (log on left) and using ipaddress (log on right). I've highlighted the
> >> log
> >> with red color line.
> >>
> >> <http://shiro-user.582556.n2.nabble.com/file/n7581268/
> shiro-log.png>
> >>
> >> Any idea why shiro respond differently ?
> >>
> >>
> >>
> >> --
> >> View this message in context: http://shiro-user.582556.n2.
> >> nabble.com/Shiro-log-responded-differently-when-
> >> access-server-via-hostname-and-ip-address-tp7581268.html
> >> Sent from the Shiro User mailing list archive at Nabble.com.
> >>
>
>
>
>
>
> --
> View this message in context: http://shiro-user.582556.n2.
> nabble.com/Shiro-log-responded-differently-when-
> access-server-via-hostname-and-ip-address-tp7581268p7581273.html
> Sent from the Shiro User mailing list archive at Nabble.com.
>


Re: Shiro log responded differently when access server via hostname and ip address.

2016-09-20 Thread iGem
Hiya Brian Demers:

I'm using google Chrome browser. Results remain unchanged when I tried to
access to server using ip via pc. I've also cleared the cookies and results
remain no change. Still can't login to server using ip address.


Brian Demers wrote
> What browser are you using on your phone? Does it support cookies ?  What
> happens when you access the IP from a PC ?
> On your desktop, if you clear your cookies do you get the same result ?
> 
> On Mon, Sep 19, 2016 at 11:22 PM, iGem <

> lwt.gemini@

> > wrote:
> 
>> I've successfully integrated shiro into my spring mvc project and has
>> been
>> really happy and impressed with shiro. However I've encountered the a
>> road
>> block which I've been trying to fix for the passed few days with no
>> success.
>>
>> Since I'm developing on pc I've always type https://localhost/ for
>> testing purposes... until there's a section where I need to test it on
>> mobile. So I pulled out my android phone connect to the same network as
>> my
>> server via wifi and typed in the url https://192.168.1.10/
> 
>> to
>> test.
>>
>> Server shows me the login page and when I typed in username and password
>> and
>> hit enter, I'm seeing the login page again which initially I thought I
>> entered the username and password incorrect. But After a few attempts the
>> result remains the same, I'm still seeing the login page only.
>>
>> After checking the log file I see that when access server via IP, even
>> though I entered the correct username and password, I'm being redirected
>> to
>> login.jsp again. This doesn't happened if I use hostname or localhost.
>>
>> I'm attaching an ss showing the different in log when access using
>> localhost
>> (log on left) and using ipaddress (log on right). I've highlighted the
>> log
>> with red color line.
>>
>> <http://shiro-user.582556.n2.nabble.com/file/n7581268/shiro-log.png>;
>>
>> Any idea why shiro respond differently ?
>>
>>
>>
>> --
>> View this message in context: http://shiro-user.582556.n2.
>> nabble.com/Shiro-log-responded-differently-when-
>> access-server-via-hostname-and-ip-address-tp7581268.html
>> Sent from the Shiro User mailing list archive at Nabble.com.
>>





--
View this message in context: 
http://shiro-user.582556.n2.nabble.com/Shiro-log-responded-differently-when-access-server-via-hostname-and-ip-address-tp7581268p7581273.html
Sent from the Shiro User mailing list archive at Nabble.com.


Re: Shiro log responded differently when access server via hostname and ip address.

2016-09-20 Thread Brian Demers
What browser are you using on your phone? Does it support cookies ?  What
happens when you access the IP from a PC ?
On your desktop, if you clear your cookies do you get the same result ?

On Mon, Sep 19, 2016 at 11:22 PM, iGem  wrote:

> I've successfully integrated shiro into my spring mvc project and has been
> really happy and impressed with shiro. However I've encountered the a road
> block which I've been trying to fix for the passed few days with no
> success.
>
> Since I'm developing on pc I've always type https://localhost/ for
> testing purposes... until there's a section where I need to test it on
> mobile. So I pulled out my android phone connect to the same network as my
> server via wifi and typed in the url https://192.168.1.10/
> to
> test.
>
> Server shows me the login page and when I typed in username and password
> and
> hit enter, I'm seeing the login page again which initially I thought I
> entered the username and password incorrect. But After a few attempts the
> result remains the same, I'm still seeing the login page only.
>
> After checking the log file I see that when access server via IP, even
> though I entered the correct username and password, I'm being redirected to
> login.jsp again. This doesn't happened if I use hostname or localhost.
>
> I'm attaching an ss showing the different in log when access using
> localhost
> (log on left) and using ipaddress (log on right). I've highlighted the log
> with red color line.
>
> <http://shiro-user.582556.n2.nabble.com/file/n7581268/shiro-log.png>
>
> Any idea why shiro respond differently ?
>
>
>
> --
> View this message in context: http://shiro-user.582556.n2.
> nabble.com/Shiro-log-responded-differently-when-
> access-server-via-hostname-and-ip-address-tp7581268.html
> Sent from the Shiro User mailing list archive at Nabble.com.
>


Shiro log responded differently when access server via hostname and ip address.

2016-09-19 Thread iGem
I've successfully integrated shiro into my spring mvc project and has been
really happy and impressed with shiro. However I've encountered the a road
block which I've been trying to fix for the passed few days with no success.

Since I'm developing on pc I've always type https://localhost/ for
testing purposes... until there's a section where I need to test it on
mobile. So I pulled out my android phone connect to the same network as my
server via wifi and typed in the url https://192.168.1.10/ to
test.

Server shows me the login page and when I typed in username and password and
hit enter, I'm seeing the login page again which initially I thought I
entered the username and password incorrect. But After a few attempts the
result remains the same, I'm still seeing the login page only.

After checking the log file I see that when access server via IP, even
though I entered the correct username and password, I'm being redirected to
login.jsp again. This doesn't happened if I use hostname or localhost.

I'm attaching an ss showing the different in log when access using localhost
(log on left) and using ipaddress (log on right). I've highlighted the log
with red color line.

<http://shiro-user.582556.n2.nabble.com/file/n7581268/shiro-log.png> 

Any idea why shiro respond differently ?



--
View this message in context: 
http://shiro-user.582556.n2.nabble.com/Shiro-log-responded-differently-when-access-server-via-hostname-and-ip-address-tp7581268.html
Sent from the Shiro User mailing list archive at Nabble.com.