List Info

Thread: Permissions oddity




Permissions oddity
user name
2006-09-20 18:26:07
I have had a 2.4.x-beta installation of JSPWiki for a few
months now and I
just upgraded to 2.4.53 yesterday. I was fooling around with
the policy file
to restrict Anonymous and Asserted users to basically be
view and comment
only. This works...mostly. 

The reason I am calling this an oddity is that I have had
the same thing
happen, but with two different pages.  First, it occured
with page "Main". 
After I restarted the server and went to the default url
(force JSPWiki to
navigate to Main internally) then I saw the Main page, I
could also see all
other pages. However, when I navigated BACK to the Main page
(by clicking on
a link, say) then I got an error message that says
"Error: You don't have
access to 'Main'. Please log in first." 

This seems to be a problem with verifying the security of
the page. I tried
to add an ACL to the Main page that looked like 
[{ALLOW view ALL}]
[{ALLOW edit ALL}]

But that did not solve the problem. Here is the relevant
parts of
jspwiki.policy ( I didn't modify the other sections ):

grant signedBy "jspwiki", 
  principal com.ecyrd.jspwiki.auth.authorize.Role
"Anonymous" {
    permission
com.ecyrd.jspwiki.auth.permissions.PagePermission
"*",
"view,comment";
    permission
com.ecyrd.jspwiki.auth.permissions.WikiPermission
"*",
"login";
};

grant signedBy "jspwiki",
  principal com.ecyrd.jspwiki.auth.authorize.Role
"Asserted" {
    permission
com.ecyrd.jspwiki.auth.permissions.PagePermission
"*",
"view,comment";
    permission
com.ecyrd.jspwiki.auth.permissions.GroupPermission
"*",
"view";
    permission
com.ecyrd.jspwiki.auth.permissions.WikiPermission
"*",
"login";
};

I also tried adding 
    permission
com.ecyrd.jspwiki.auth.permissions.PagePermission
"*:Main",
"view,comment"; 
to both blocks with no success. 

Later that day the problem went away, so I just thought I
made a noob
mistake.  But, today (after restarting the Wiki's Tomcat
service) I have the
same problem, but with a different page!  In this case, I
was able to
identify more of the scenario because another user found the
problem first.
Here is the actions that took place (possible relevant).

1.  She viewed the page.
2. She logged out
3. I logged in
4. I edited the page that she was able to view
5. She attempted to view the page (without logging in), but
was denied.
6. She logged in
7. She attempted to view the page, but was denied.
8. I logged out
9. I attempted to view the page (without logging in), but
was denied.
10. I logged back in
11. I attempted to view the page and was OK

The difference between the two user accounts is that I am
part of the Admin
group and she is not.

Is there something I can do to help in debugging this
problem?
-- 
View this message in context: http://www.nabble.com/Permissions-oddity-tf23072
03.html#a6413756
Sent from the JspWiki - User mailing list archive at
Nabble.com.

_______________________________________________
Jspwiki-users mailing list
Jspwiki-usersecyrd.com
http://ecyrd.com/cgi-bin/mailman/listinfo/jspwiki-users
Permissions oddity
user name
2006-09-20 18:40:28
Following up...

I restarted the service again in an attempt to determine
when and where the
problem occurred.

FYI, I am in the Admin group

* I went to the wiki baseUrl and was able to view the main
page.
* I clicked on the link to the Main page in the LeftMenu and
was denied
* I logged in and was able to see the Main page.
* I clicked on the link to the Main page in the LeftMenu and
was able to
view the page
* I clicked logout
* I clicked on the link to the Main page in the LeftMenu and
was denied
* I logged in as a user that is not assigned to any groups
* I clicked on the link to the Main page in the LeftMenu and
was able to
view the page
* I clicked logout
* I clicked on the link to the Main page in the LeftMenu and
was able to
view the page
* I logged back in as myself (admin)
* I clicked on the link to the Main page in the LeftMenu and
was able to
view the page
* I clicked logout
* I clicked on the link to the Main page in the LeftMenu and
was able to
view the page

So, the digest version of that.  I was not able to view the
Main page as
Anonymous or Asserted until I logged in as a user with no
groups.  Since
then I have tried many combinations of users with/without
groups and can't
replicate the permissions problem.  Will continue to try to
find a viable
scenario.
-- 
View this message in context: http://www.nabble.com/Permissions-oddity-tf23072
03.html#a6414014
Sent from the JspWiki - User mailing list archive at
Nabble.com.

_______________________________________________
Jspwiki-users mailing list
Jspwiki-usersecyrd.com
http://ecyrd.com/cgi-bin/mailman/listinfo/jspwiki-users
Permissions oddity
user name
2006-09-20 18:56:15
Sorry about the chain of posts, I'm trying to gather enough
data that
something can help me...

So, I restarted the Tomcat service again.  This time started
the same as
before, got a denial when not logged in.  But this time, I
logged in as a
different (non-admin) user user.  I got a
"forbidden" page when I clicked on
the Main link.  That definitely shouldn't have happened. 
So, I went to the
log to see if anything turned up there.  

Notice the view error, then a LOGIN_AUTHENTICATED followed
milliseconds
later by a LOGIN_FAILED?  I only attempted to login once,
but internally, it
looked like it had some kind of glitch.  

2006-09-20 14:42:18,104 [Thread-1] INFO
com.ecyrd.jspwiki.WikiServlet  -
WikiServlet initialized.
2006-09-20 14:42:42,916 [JSPWiki Session Monitor] INFO
com.ecyrd.jspwiki.util.WikiBackgroundThread  - Starting up
background
thread: JSPWiki Session Monitor.
2006-09-20 14:42:46,901 [http-3380-Processor25] INFO
com.ecyrd.jspwiki.WikiContext
AIMSWiki:http://aegisv-
slb30:3380/wiki/Wiki.jsp - User 10.10.11.64 has no
access - redirecting
(permission=("com.ecyrd.jspwiki.auth.permissions.PageP
ermission","AIMSWiki:Main","view&qu
ot;))
2006-09-20 14:42:51,213 [http-3380-Processor25] INFO
com.ecyrd.jspwiki.WikiContext
AIMSWiki:http://aegisv-
slb30:3380/wiki/Wiki.jsp - User 10.10.11.64 has no
access - redirecting
(permission=("com.ecyrd.jspwiki.auth.permissions.PageP
ermission","AIMSWiki:Main","view&qu
ot;))
2006-09-20 14:42:56,089 [http-3380-Processor25] INFO
SecurityLog
AIMSWiki:http://aegisv
-slb30:3380/wiki/Login.jsp -
WikiSecurityEvent.LOGIN_AUTHENTICATED
[source=com.ecyrd.jspwiki.auth.AuthenticationManager14e45b3,
princpal=com.ecyrd.jspwiki.auth.WikiPrincipal sobell,
target=com.ecyrd.jspwiki.WikiSession1a8739b]
2006-09-20 14:42:56,089 [http-3380-Processor25] INFO JSPWiki
AIMSWiki:http://aegisv
-slb30:3380/wiki/Login.jsp - Successfully
authenticated user sobell (custom auth)
2006-09-20 14:42:56,089 [http-3380-Processor25] INFO JSPWiki
AIMSWiki:http://aegisv
-slb30:3380/wiki/Login.jsp - Redirecting user to
Wiki.jsp
2006-09-20 14:42:56,104 [http-3380-Processor24] INFO
com.ecyrd.jspwiki.WikiSession
AIMSWiki:http://aegisv-
slb30:3380/wiki/Wiki.jsp - Cookie changed to
SophiaBell
2006-09-20 14:42:56,120 [http-3380-Processor24] INFO
com.ecyrd.jspwiki.auth.AuthenticationManager
AIMSWiki:http://aegisv-
slb30:3380/wiki/Wiki.jsp - Failed login: No remote
user found
2006-09-20 14:42:56,120 [http-3380-Processor24] ERROR
SecurityLog
AIMSWiki:http://aegisv-
slb30:3380/wiki/Wiki.jsp -
WikiSecurityEvent.LOGIN_FAILED
[source=com.ecyrd.jspwiki.auth.AuthenticationManager14e45b3,
princpal=com.ecyrd.jspwiki.auth.WikiPrincipal sobell,
target=com.ecyrd.jspwiki.WikiSession1a8739b]
2006-09-20 14:42:57,417 [http-3380-Processor24] INFO
com.ecyrd.jspwiki.WikiContext
AIMSWiki:http://aegisv-
slb30:3380/wiki/Wiki.jsp - User SophiaBell has no
access - forbidden
(permission=("com.ecyrd.jspwiki.auth.permissions.PageP
ermission","AIMSWiki:Main","view&qu
ot;))
2006-09-20 14:43:03,651 [http-3380-Processor24] INFO
com.ecyrd.jspwiki.WikiContext
AIMSWiki:http://aegisv-
slb30:3380/wiki/Wiki.jsp - User SophiaBell has no
access - forbidden
(permission=("com.ecyrd.jspwiki.auth.permissions.PageP
ermission","AIMSWiki:Main","view&qu
ot;))

I had originally thought that it might have something to do
with groups
since this user and myself both belong to a group, but when
I log in as a
non-group user I still have problems with the permissions of
the Main page.


-- 
View this message in context: http://www.nabble.com/Permissions-oddity-tf23072
03.html#a6414276
Sent from the JspWiki - User mailing list archive at
Nabble.com.

_______________________________________________
Jspwiki-users mailing list
Jspwiki-usersecyrd.com
http://ecyrd.com/cgi-bin/mailman/listinfo/jspwiki-users
[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )