Re: [xwiki-users] 4-byte UTF and XWiki (MySQL utf8mb4 encoding)

2016-04-08 Thread Debajit Adhikary
I have changed my MySQL database columns to support utf8mb4 (4-byte
unicode), and I can render chinese characters etc correctly now.

When I upgrade my XWiki to a newer version in the future, will this cause
issues in the upgrade? (I am guessing there may be database schema changes
in a future XWiki version)

On Thu, Apr 7, 2016 at 7:08 PM, Sergiu Dumitriu <ser...@xwiki.org> wrote:

> It will be almost impossible to use utf8mb4 with XWiki, because of the
> terrible way mysql is designed. Here's the reason why:
>
> mysql imposes several hard limits on the maximum size of several things:
> length of indexes, length of rows. These lengths, unfortunately, are not
> computed as the maximum size of the actual data, but of the theoretical
> data that could be placed in there. This means that the size of a
> VARCHAR(255) isn't 255 bytes, but 255 chars * maximum number of bytes
> that such a char could have (3 for utf8, 4 for utf8mb4).
>
> You could make it work if you change the schema to reduce the length of
> several fields, but you would do that at your own risk.
>
> On 04/06/2016 08:58 PM, Debajit Adhikary wrote:
> > Some more information:
> >
> > On my Mac, when I try to set up XWiki with MySQL, I ran the following:
> >
> > # Install mysql and start
> >
> > brew update
> > brew install mysql
> > mysql.server start
> > # Now I can connect as "mysql -uroot"
> >
> > # Create a new MySQL database for XWiki
> > # see
> http://platform.xwiki.org/xwiki/bin/view/AdminGuide/InstallationMySQL
> >
> > mysql -u root -e "create database xwiki default character set utf8mb4
> > collate utf8mb4_unicode_ci"
> >
> > mysql -u root -e "grant all privileges on *.* to xwiki@localhost
> > identified by 'xwiki'"
> >
> >
> > # Configure hibernate.cfg.xml
> > # This is only the mysql section
> >
> >  name="connection.url">jdbc:mysql://localhost/xwiki
> > xwiki
> > xwiki
> >  > name="connection.driver_class">com.mysql.jdbc.Driver
> >  > name="dialect">org.hibernate.dialect.MySQL5InnoDBDialect
> > true
> > UTF-8
> > true
> > 20
> > 
> > 
> > 
> > 
> > 
> >
> > Now when I start XWiki, I get the error:
> > com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException:
> > Row size too large. The maximum row size for the used table type, not
> > counting BLOBs, is 65535. This includes storage overhead, check the
> manual.
> > You have to change some columns to TEXT or BLOBs
> >
> > It looks like whatever creates the XWiki tables is not handling utf8mb4
> > (see also https://mathiasbynens.be/notes/mysql-utf8mb4 ).
> >
> >
> >
> > On Wed, Apr 6, 2016 at 5:17 PM, Debajit Adhikary <debajit.w...@gmail.com
> >
> > wrote:
> >
> >> I have an XWiki installation, and I noticed that emoji's were not
> getting
> >> saved correctly and were rendering as question marks in XWiki. This is
> >> caused by MySQL's default encoding which is "utf8" and not "utf8mb4"
> >> (4-byte UTF to store the full unicode character set)
> >>
> >> To fix this, I am in the process of converting all my MySQL database
> >> tables into utf8mb4 encoding, which is turning out to be quite a lot of
> >> manual work.
> >>
> >> When XWiki creates the database tables for MySQL, can it use utf8mb4
> >> encoding by default? Is this something I could open a bug request for?
> >>
> > ___
> > users mailing list
> > users@xwiki.org
> > http://lists.xwiki.org/mailman/listinfo/users
> >
>
>
> --
> Sergiu Dumitriu
> http://purl.org/net/sergiu/
> ___
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users
>
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] 4-byte UTF and XWiki (MySQL utf8mb4 encoding)

2016-04-06 Thread Debajit Adhikary
Some more information:

On my Mac, when I try to set up XWiki with MySQL, I ran the following:

# Install mysql and start

brew update
brew install mysql
mysql.server start
# Now I can connect as "mysql -uroot"

# Create a new MySQL database for XWiki
# see http://platform.xwiki.org/xwiki/bin/view/AdminGuide/InstallationMySQL

mysql -u root -e "create database xwiki default character set utf8mb4
collate utf8mb4_unicode_ci"

mysql -u root -e "grant all privileges on *.* to xwiki@localhost
identified by 'xwiki'"


# Configure hibernate.cfg.xml
# This is only the mysql section

jdbc:mysql://localhost/xwiki
xwiki
xwiki
com.mysql.jdbc.Driver
org.hibernate.dialect.MySQL5InnoDBDialect
true
UTF-8
true
20






Now when I start XWiki, I get the error:
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException:
Row size too large. The maximum row size for the used table type, not
counting BLOBs, is 65535. This includes storage overhead, check the manual.
You have to change some columns to TEXT or BLOBs

It looks like whatever creates the XWiki tables is not handling utf8mb4
(see also https://mathiasbynens.be/notes/mysql-utf8mb4 ).



On Wed, Apr 6, 2016 at 5:17 PM, Debajit Adhikary <debajit.w...@gmail.com>
wrote:

> I have an XWiki installation, and I noticed that emoji's were not getting
> saved correctly and were rendering as question marks in XWiki. This is
> caused by MySQL's default encoding which is "utf8" and not "utf8mb4"
> (4-byte UTF to store the full unicode character set)
>
> To fix this, I am in the process of converting all my MySQL database
> tables into utf8mb4 encoding, which is turning out to be quite a lot of
> manual work.
>
> When XWiki creates the database tables for MySQL, can it use utf8mb4
> encoding by default? Is this something I could open a bug request for?
>
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] 4-byte UTF and XWiki (MySQL utf8mb4 encoding)

2016-04-06 Thread Debajit Adhikary
I have an XWiki installation, and I noticed that emoji's were not getting
saved correctly and were rendering as question marks in XWiki. This is
caused by MySQL's default encoding which is "utf8" and not "utf8mb4"
(4-byte UTF to store the full unicode character set)

To fix this, I am in the process of converting all my MySQL database tables
into utf8mb4 encoding, which is turning out to be quite a lot of manual
work.

When XWiki creates the database tables for MySQL, can it use utf8mb4
encoding by default? Is this something I could open a bug request for?
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] Moving an XWiki page under source control

2016-03-15 Thread Debajit Adhikary
Hi

For my XWiki deployment, I need the search results to be customized. I
would like to move the contents of the search results page under source
control, so that I can use our continuous deployment system.

What is the best way to do this?

I've tried to move the search result page (and its macros) to a skin file
and include a #template(filename) link in the wiki page — but I have a
feeling this may not be a good way to do it.

I've noticed some files under webapps/resources/uicomponents/ — can I add
my files there? If I did, how do I let the UI know that it should read a
particular file?

If there is some XWiki documentation around this, could you point me to it
please? I was not able to find anything around that.

Thanks in advance
Debajit
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] "XWiki is initializing" message

2015-10-16 Thread Debajit Adhikary
I am in the process of writing an extension for XWiki.

Each time I make some code changes, and then refresh my local instance of
XWiki I see the message "XWiki is initializing..." which takes some time to
finish.

For small code changes, I feel like this "initialization" step slows down
my development.

What exactly is happening in this "XWiki is initializing..." step, and what
could I do to avoid this step entirely, so that I can work faster on my
extension?
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] ScriptService issue --- Cannot access @Named ScriptService object through $services object

2015-10-14 Thread Debajit Adhikary
Thanks for the suggestion, that worked.

Changing the @Inject to use the @Role (interface) instead of the @Component
(the concrete class) fixed the issue :) Thanks for your help :)

Out of curiosity, how does the Component manager know which concrete
implementation to pick? Since I have only one component, does it
automatically use that for the @Inject?



On Wed, Oct 14, 2015 at 2:02 AM, Thomas Mortagne <thomas.morta...@xwiki.com>
wrote:

> On Wed, Oct 14, 2015 at 9:11 AM, vinc...@massol.net <vinc...@massol.net>
> wrote:
> >
> >
> > On 14 Oct 2015 at 09:00:15, vinc...@massol.net (vinc...@massol.net
> (mailto:vinc...@massol.net)) wrote:
> >
> >>
> >>
> >> On 14 Oct 2015 at 06:43:36, Marius Dumitru Florea (
> mariusdumitru.flo...@xwiki.com(mailto:mariusdumitru.flo...@xwiki.com))
> wrote:
> >>
> >> > Hi Debajit,
> >> >
> >> > On Oct 14, 2015 01:17, "Debajit Adhikary" wrote:
> >> > >
> >> > > I created an XWiki component which is available as a jar file.
> >> > >
> >> > > I have a ScriptService class for the component too:
> >> > >
> >> > > 
> >> > >
> >> > > @Role
> >> > > public interface SearchClient
> >> > > {
> >> > > String search();
> >> > > }
> >> > >
> >> > > 
> >> > >
> >> > > @Component
> >> > > @Singleton
> >> > > public class InternalSearchClient implements SearchClient
> >> > > {
> >> > > public String search()
> >> > > {
> >> > > return "test search results";
> >> > > }
> >> > > }
> >> > >
> >> > > 
> >> > >
> >> > > @Component
> >> > > @Named("internalSearch")
> >> > > @Singleton
> >> > > public class InternalSearchScriptService implements ScriptService
> >> > > {
> >> >
> >> > > @Inject
> >> > > private InternalSearchClient searchClient;
> >> >
> >> > You need to "inject" the role (interface), not directly the
> implementation.
> >> > That's why you use the Component Manager. Othewise you could have
> simply
> >> > used the "new" operator to instantiate yourself the component.
> >>
> >> Good catch, didn’t see it when I replied yesterday! :)
> >>
> >> I guess we could catch this in the AnnotationComponentLoader and report
> an error.
> >
> > Actually, the Component Manager should raise an error if it fails to
> inject a field. I was sure it was doing that, strange. I’ll debug it.
>
> It does.
>
> >
> > Thanks
> > -Vincent
> >
> >> Thanks
> >> -Vincent
> >>
> >> > Hope this helps,
> >> > Marius
> >> >
> >> > >
> >> > > public String search()
> >> > > {
> >> > > return this.searchClient.search();
> >> > > }
> >> > > }
> >> > >
> >> > > 
> >> > >
> >> > > I've added all the above files into their own jar with a
> components.txt
> >> > > file:
> >> > >
> >> > > com.mycompany.wiki.search.InternalSearchClient
> >> > > com.mycompany.wiki.search.InternalSearchScriptService
> >> > >
> >> > > and in my Wiki's pom.xml, I have the following:
> >> > >
> >> > >
> >> > > org.xwiki.commons
> >> > > xwiki-commons-script
> >> > > ${commons.version}
> >> > >
> >> > >
> >> > >
> >> > > Now from my Wiki page, when I do the following:
> >> > >
> >> > > {{groovy}}
> >> > > println(services.internalSearch.search())
> >> > > {{/groovy}}
> >> > >
> >> > > I get an error message saying "java.lang.NullPointerException:
> Cannot
> >> > > invoke method search() on null object"
> >> > >
> >> > > What am I doing wrong here?
> >> > >
> >> > > (I followed the directions in
> >> > > http://platform.xwiki.org/xwiki/bin/view/DevGuide/WritingComponents
> — have
> >> > > these directions changed, and/or is there anything else I need to
> do? )
> >>
> >
> > ___
> > users mailing list
> > users@xwiki.org
> > http://lists.xwiki.org/mailman/listinfo/users
>
>
>
> --
> Thomas Mortagne
> ___
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users
>
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] Making an HTTP POST call from an XWiki extension

2015-10-14 Thread Debajit Adhikary
What is the easiest/recommended way to make an HTTP POST or GET call from
within an XWiki extension?

Should I use Restlet? (I am guessing XWiki comes with Restlet support)
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] ScriptService issue --- Cannot access @Named ScriptService object through $services object

2015-10-13 Thread Debajit Adhikary
I created an XWiki component which is available as a jar file.

I have a ScriptService class for the component too:



@Role
public interface SearchClient
{
String search();
}



@Component
@Singleton
public class InternalSearchClient implements SearchClient
{
public String search()
{
return "test search results";
}
}



@Component
@Named("internalSearch")
@Singleton
public class InternalSearchScriptService implements ScriptService
{
@Inject
private InternalSearchClient searchClient;

public String search()
{
return this.searchClient.search();
}
}



I've added all the above files into their own jar with a components.txt
file:

com.mycompany.wiki.search.InternalSearchClient
com.mycompany.wiki.search.InternalSearchScriptService

and in my Wiki's pom.xml, I have the following:


  org.xwiki.commons
  xwiki-commons-script
  ${commons.version}



Now from my Wiki page, when I do the following:

{{groovy}}
println(services.internalSearch.search())
{{/groovy}}

I get an error message saying "java.lang.NullPointerException: Cannot
invoke method search() on null object"

What am I doing wrong here?

(I followed the directions in
http://platform.xwiki.org/xwiki/bin/view/DevGuide/WritingComponents — have
these directions changed, and/or is there anything else I need to do? )
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] ScriptService issue --- Cannot access @Named ScriptService object through $services object

2015-10-13 Thread Debajit Adhikary
I created an XWiki component which is available as a jar file.

I have a ScriptService class for the component too:



@Role
public interface SearchClient
{
String search();
}



@Component
@Singleton
public class InternalSearchClient implements SearchClient
{
public String search()
{
return "test search results";
}
}



@Component
@Named("internalSearch")
@Singleton
public class InternalSearchScriptService implements ScriptService
{
@Inject
private InternalSearchClient searchClient;

public String search()
{
return this.searchClient.search();
}
}



I've added all the above files into their own jar with a components.txt
file:

com.mycompany.wiki.search.InternalSearchClient
com.mycompany.wiki.search.InternalSearchScriptService

and in my Wiki's pom.xml, I have the following:


  org.xwiki.commons
  xwiki-commons-script
  ${commons.version}



Now from my Wiki page, when I do the following:

{{groovy}}
println(services.internalSearch.search())
{{/groovy}}

I get an error message saying "java.lang.NullPointerException: Cannot
invoke method search() on null object"

What am I doing wrong here?

(I followed the directions in
http://platform.xwiki.org/xwiki/bin/view/DevGuide/WritingComponents — have
these directions changed, and/or is there anything else I need to do? )
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Modifying the Search results page?

2015-10-09 Thread Debajit Adhikary
Thanks.

On Fri, Oct 9, 2015 at 4:21 AM, Marius Dumitru Florea <
mariusdumitru.flo...@xwiki.com> wrote:

> On Fri, Oct 9, 2015 at 5:04 AM, Debajit Adhikary <debaj...@gmail.com>
> wrote:
>
> > I am trying to connect my XWiki to a third-party search engine.
> >
> > How can I modify the search results page?
> >
> > I am trying to modify this page:
> > http://localhost:8443/bin/view/Main/Search
> >
> >
>
> > What file corresponds to this? In general, how can I find out what file
> > serves a URL path? (I looked in struts-config.xml, but I did not find any
> > "search" references there.
> >
>
> Main.Search is a wiki page. All wiki pages are stored in the database, not
> (directly) on the file system. You can edit a wiki page using the edit menu
> (pencil icon), as long as you have edit right.
>
> Hope this helps,
> Marius
>
>
> > ___
> > users mailing list
> > users@xwiki.org
> > http://lists.xwiki.org/mailman/listinfo/users
> >
> ___
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users
>
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] Modifying the Search results page?

2015-10-08 Thread Debajit Adhikary
I am trying to connect my XWiki to a third-party search engine.

How can I modify the search results page?

I am trying to modify this page:
http://localhost:8443/bin/view/Main/Search

What file corresponds to this? In general, how can I find out what file
serves a URL path? (I looked in struts-config.xml, but I did not find any
"search" references there.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] LDAP group mapping not working with Trusted LDAP

2015-09-24 Thread Debajit Adhikary
I have XWiki set up with Trusted LDAP (Kerberos + LDAP), and I am able to
log in and see that my LDAP information (like full name and email) is
populated in my user profile.

Group mapping, however, does not work.

Here is the relevant parts of my xwiki.cfg file:

(Notes:
- I have changed the real domain name to "mydomain" below
- The remote user gets set as usern...@ant.mydomain.com )



*xwiki.xfg:*

# Trusted LDAP
xwiki.authentication.authclass=com.xwiki.authentication.trustedldap.TrustedLDAPAuthServiceImpl
xwiki.authentication.trustedldap.remoteUserParser=([^@]+)@ANT\.(.+)
xwiki.authentication.trustedldap.remoteUserMapping.1=login
xwiki.authentication.trustedldap.remoteUserMapping.2=domain

# LDAP
xwiki.authentication.ldap.server=ldap.mydomain.com
xwiki.authentication.ldap.port=389
xwiki.authentication.ldap.bind_DN=
xwiki.authentication.ldap.bind_pass=
xwiki.authentication.ldap.base_DN=o=mydomain.com
xwiki.authentication.ldap.UID_attr=uid
xwiki.authentication.ldap.group_classes=posixgroup,group,groupofuniquenames
xwiki.authentication.ldap.group_memberfields=memberuid
xwiki.authentication.ldap.fields_mapping=last_name=sn,first_name=givenName,email=mail
xwiki.authentication.ldap.update_user=1
xwiki.authentication.ldap.group_mapping=XWiki.IntranetGroup=cn=intranet,ou=posix
groups,ou=infrastructure,o=mydomain.com

--

For reference, I am able to query for a single user like this (using
anonymous access):
% /usr/bin/ldapsearch -x -h ldap.mydomain.com -p 389 -b "o=mydomain.com"
uid=username

Also, I can query for a group (called "intranet") like this:
% /usr/bin/ldapsearch -x -h ldap.mydomain.com -p 389 -b "ou=posix
groups,ou=infrastructure,o=mydomain.com" cn=intranet

I've spent a lot of time with different LDAP options, but I am not able to
get LDAP group mapping to work. Could anyone tell me what I am doing wrong
here?

Thanks in advance
Debajit
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] LDAP group mapping not working with Trusted LDAP

2015-09-24 Thread Debajit Adhikary
The issue appears to be solved now. (There was an error in my regex)

On Thu, Sep 24, 2015 at 12:20 PM, Debajit Adhikary <debaj...@gmail.com>
wrote:

> I have XWiki set up with Trusted LDAP (Kerberos + LDAP), and I am able to
> log in and see that my LDAP information (like full name and email) is
> populated in my user profile.
>
> Group mapping, however, does not work.
>
> Here is the relevant parts of my xwiki.cfg file:
>
> (Notes:
> - I have changed the real domain name to "mydomain" below
> - The remote user gets set as usern...@ant.mydomain.com )
>
> 
>
> *xwiki.xfg:*
>
> # Trusted LDAP
>
> xwiki.authentication.authclass=com.xwiki.authentication.trustedldap.TrustedLDAPAuthServiceImpl
> xwiki.authentication.trustedldap.remoteUserParser=([^@]+)@ANT\.(.+)
> xwiki.authentication.trustedldap.remoteUserMapping.1=login
> xwiki.authentication.trustedldap.remoteUserMapping.2=domain
>
> # LDAP
> xwiki.authentication.ldap.server=ldap.mydomain.com
> xwiki.authentication.ldap.port=389
> xwiki.authentication.ldap.bind_DN=
> xwiki.authentication.ldap.bind_pass=
> xwiki.authentication.ldap.base_DN=o=mydomain.com
> xwiki.authentication.ldap.UID_attr=uid
> xwiki.authentication.ldap.group_classes=posixgroup,group,groupofuniquenames
> xwiki.authentication.ldap.group_memberfields=memberuid
>
> xwiki.authentication.ldap.fields_mapping=last_name=sn,first_name=givenName,email=mail
> xwiki.authentication.ldap.update_user=1
> xwiki.authentication.ldap.group_mapping=XWiki.IntranetGroup=cn=intranet,ou=posix
> groups,ou=infrastructure,o=mydomain.com
>
> --
>
> For reference, I am able to query for a single user like this (using
> anonymous access):
> % /usr/bin/ldapsearch -x -h ldap.mydomain.com -p 389 -b "o=mydomain.com"
> uid=username
>
> Also, I can query for a group (called "intranet") like this:
> % /usr/bin/ldapsearch -x -h ldap.mydomain.com -p 389 -b "ou=posix
> groups,ou=infrastructure,o=mydomain.com" cn=intranet
>
> I've spent a lot of time with different LDAP options, but I am not able to
> get LDAP group mapping to work. Could anyone tell me what I am doing wrong
> here?
>
> Thanks in advance
> Debajit
>
>
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Using LDAP for page access rights with Kerberos auth

2015-09-23 Thread Debajit Adhikary
Thanks for the clarification, Thomas.

Does LDAP group syncing work with Trusted LDAP?

(I am able to log in using Trusted LDAP, and can see my LDAP details like
full-name and email address show up, but I am not able to get LDAP
group_mapping to work at all — so I'd like to confirm if it would work with
Trusted LDAP in the first place)



On Tue, Sep 22, 2015 at 11:59 PM, Thomas Mortagne <thomas.morta...@xwiki.com
> wrote:

> On Wed, Sep 23, 2015 at 4:42 AM, Debajit Adhikary <debaj...@gmail.com>
> wrote:
> > Thanks, I was able to set it up successfully.
> >
> > I want to check if the currently logged-in user ($xwiki.getUser()) is a
> > member of a particular LDAP group. What is the best way to do this with
> the
> > "Trusted LDAP" setup?
> >
> > *Option 1:*
> > I could map the LDAP groups to XWiki groups.
>
> That would be the easiest I think.
>
> >
> > *Option 2:*
> > Can I do this dynamically without having to map the LDAP groups? (i.e. is
> > there an easy way to check if a user belongs to an LDAP group without
> > having to map the LDAP group to an XWiki group?)
>
> There is some more or less hidden APIs you can use for that (basically
> the tools used by the authenticator to synchronize LDAP Groups and
> XWiki Groups) but it's really not been written with Velocity scripting
> in mind.
>
> You can look at
>
> https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-ldap/xwiki-platform-ldap-authenticator/src/main/java/com/xpn/xwiki/user/impl/LDAP/XWikiLDAPAuthServiceImpl.java#L280
> for an example of how to setup those tools (in Groovy for example).
> Then you can use APIs like XWikiLDAPUtils#getGroupMembers.
>
> >
> >
> > On Fri, Sep 18, 2015 at 12:47 AM, Thomas Mortagne <
> thomas.morta...@xwiki.com
> >> wrote:
> >
> >> If you have an authenticator in front of XWiki that populate the
> >> REMOTE_USER request property you could use
> >>
> >>
> http://extensions.xwiki.org/xwiki/bin/view/Extension/XWiki+Authenticator+Trusted+LDAP
> >> which has been designed specifically for this use case.
> >>
> >> On Fri, Sep 18, 2015 at 3:05 AM, Debajit Adhikary <debaj...@gmail.com>
> >> wrote:
> >> > I have an XWiki setup that uses Kerberos for authentication.
> >> >
> >> > I would like to continue using Kerberos, but use LDAP groups for
> >> > controlling page access rights.
> >> >
> >> > How could I do this?
> >> >
> >> > (If you could point me in the right direction, or to any appropriate
> >> > documentation, that would be a big help)
> >> >
> >> > Thanks in advance
> >> > —Debajit
> >> > ___
> >> > users mailing list
> >> > users@xwiki.org
> >> > http://lists.xwiki.org/mailman/listinfo/users
> >>
> >>
> >>
> >> --
> >> Thomas Mortagne
> >> ___
> >> users mailing list
> >> users@xwiki.org
> >> http://lists.xwiki.org/mailman/listinfo/users
> >>
> > ___
> > users mailing list
> > users@xwiki.org
> > http://lists.xwiki.org/mailman/listinfo/users
>
>
>
> --
> Thomas Mortagne
> ___
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users
>
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Using LDAP for page access rights with Kerberos auth

2015-09-22 Thread Debajit Adhikary
Thanks, I was able to set it up successfully.

I want to check if the currently logged-in user ($xwiki.getUser()) is a
member of a particular LDAP group. What is the best way to do this with the
"Trusted LDAP" setup?

*Option 1:*
I could map the LDAP groups to XWiki groups.

*Option 2:*
Can I do this dynamically without having to map the LDAP groups? (i.e. is
there an easy way to check if a user belongs to an LDAP group without
having to map the LDAP group to an XWiki group?)


On Fri, Sep 18, 2015 at 12:47 AM, Thomas Mortagne <thomas.morta...@xwiki.com
> wrote:

> If you have an authenticator in front of XWiki that populate the
> REMOTE_USER request property you could use
>
> http://extensions.xwiki.org/xwiki/bin/view/Extension/XWiki+Authenticator+Trusted+LDAP
> which has been designed specifically for this use case.
>
> On Fri, Sep 18, 2015 at 3:05 AM, Debajit Adhikary <debaj...@gmail.com>
> wrote:
> > I have an XWiki setup that uses Kerberos for authentication.
> >
> > I would like to continue using Kerberos, but use LDAP groups for
> > controlling page access rights.
> >
> > How could I do this?
> >
> > (If you could point me in the right direction, or to any appropriate
> > documentation, that would be a big help)
> >
> > Thanks in advance
> > —Debajit
> > ___
> > users mailing list
> > users@xwiki.org
> > http://lists.xwiki.org/mailman/listinfo/users
>
>
>
> --
> Thomas Mortagne
> ___
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users
>
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] Using LDAP for page access rights with Kerberos auth

2015-09-17 Thread Debajit Adhikary
I have an XWiki setup that uses Kerberos for authentication.

I would like to continue using Kerberos, but use LDAP groups for
controlling page access rights.

How could I do this?

(If you could point me in the right direction, or to any appropriate
documentation, that would be a big help)

Thanks in advance
—Debajit
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Configuration setting to force reading from database?

2015-05-11 Thread Debajit Adhikary
Thanks for the clarification, Vincent.

—Debajit

Date: Sun, 10 May 2015 11:02:02 +0200
From: vinc...@massol.net
To: users@xwiki.org
CC: deba...@outlook.com
Subject: Re: [xwiki-users] Configuration setting to force reading from database?

This would mean never using the document cache when in a cluster which would 
cause severe performances drop (making xwiki unusable). 
The problem is that we have only a single API to get a document whereas we 
would need 2 for your use case:* one to get a readonly document (from the 
cache)* one to get an editable document (always from the DB) 
That could be interesting to implement in the future, you could create a jira 
issue about this if you’re interested.
Thanks-Vincent
  
On 8 May 2015 at 20:12:25, Debajit Adhikary (deba...@outlook.com) wrote: Is 
there a configuration setting to force all hosts in a cluster to read from the 
database (instead of reading from the cache) each time a wiki page is 
requested? 
  
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] Configuration setting to force reading from database?

2015-05-08 Thread Debajit Adhikary
Is there a configuration setting to force all hosts in a cluster to read from 
the database (instead of reading from the cache) each time a wiki page is 
requested?
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] Slow cache sync with JGroups / S3 in an EC2 cluster

2015-05-07 Thread Debajit Adhikary
We have deployed XWiki over a two-node EC2 cluster. We are using JGroups over 
S3 for cluster messaging as multicast does not work in EC2. 
I have noticed that if I edit a page on host A, and then refresh the same page 
from host B, it shows stale content — it takes up to a minute for the caches to 
sync.
Is this something others have observed when running XWiki over multiple hosts? 
(I'm wondering if this is a JGroups/S3 issue)For people who are running XWiki 
in a cluster, how long does it typically take for changes made from one machine 
to show up in another?Are there any recommendations on how to speed up 
cache-sync time between XWiki hosts on a cluster?
Also, in a cluster, is the default XWiki cache a distributed cache? Or is the 
same cache content replicated across all nodes in a cluster?

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] Moving a page and its hierarchy

2015-03-05 Thread Debajit Adhikary
I have a page hierarchy of the following form:
+ Parent1- Child1- Child2- Child2
Where one parent page has three children pages.
I would like to move this entire hierarchy rooted at Parent1 to another space.  
If I rename Parent1, then only Parent1 gets moved to the new space, and not its 
children.
Is there a way to move the entire hierarchy of pages (parent page and all its 
child pages) to another space?
  
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Flagging a page in XWiki?

2015-03-05 Thread Debajit Adhikary
 Do you mean bookmarking the page, watching the page, or do you mean tagging a 
 page, or something else?
I was referring to flagging a page for having content that, say, exposes secure 
information (like login credentials or similar) which should not be exposed to 
the public or any content that is irrelevant or inappropriate. The general idea 
is that once a page is flagged, an email goes out to the owners / moderators 
with a link to the page, and that they can either remove the content or notify 
the authors to update the page in some way. 


Date: Thu, 5 Mar 2015 07:45:53 +0100
From: vinc...@massol.net
To: deba...@outlook.com; users@xwiki.org
Subject: Re: [xwiki-users] Flagging a page in XWiki?

Hi, 
On 5 Mar 2015 at 01:22:40, Debajit Adhikary 
(deba...@outlook.com(mailto:deba...@outlook.com)) wrote:

 Is there any way for a user to flag a page in XWiki?
Do you mean bookmarking the page, watching the page, or do you mean tagging a 
page, or something else?
For tagging, see 
http://extensions.xwiki.org/xwiki/bin/view/Extension/Tag+Application
Thanks-Vincent

  
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] How to hide Click here to force editing link for restricted pages?

2015-03-04 Thread Debajit Adhikary
When an unauthorized user visits a restricted page, they see the message Click 
here to force editing — do users need to belong to a particular group to see 
this message? 
What specifically is the intent behind this feature? (I'm curious as it appears 
to allow other users to, in a way, bypass the security mechanism). How do I 
prevent a user from seeing the Click here to force editing link?

—Debajit  
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] Flagging a page in XWiki?

2015-03-04 Thread Debajit Adhikary
Is there any way for a user to flag a page in XWiki?
  
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] CSRF Error when trying to edit access rights

2015-03-03 Thread Debajit Adhikary
I am trying to set up access rights for a page that I created, and when I try 
to revoke view permissions for a particular user, I see the following error: 
2015-03-04 01:29:42 - CSRFToken: Secret token verification failed, token: 
xykyhIj3uArxuDcDQU9JsA, stored token: ncSmP4I2YiP6QkKCMAguDw
Why am I seeing this error, and what could I do to fix it?
(I see this error repeatedly) 
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] CSRF Error when trying to edit access rights

2015-03-03 Thread Debajit Adhikary
 I am trying to set up access rights for a page that I created, and when I try 
 to revoke view permissions for a particular user, I see the following error: 
 2015-03-04 01:29:42 - CSRFToken: Secret token verification failed, token: 
 xykyhIj3uArxuDcDQU9JsA, stored token: ncSmP4I2YiP6QkKCMAguDw
 Why am I seeing this error, and what could I do to fix it?
 (I see this error repeatedly)   


I had deployed XWiki on two hosts, and it appears that I was signed in into one 
of the machines. Signing out of all sessions fixed the issue.   
  
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] Search for all documents in a space?

2015-03-02 Thread Debajit Adhikary
What should I type in the Search field to list all the documents in a space?
I tried typing in where doc.space='SpaceName' but that does not give me the 
expected results.
I know that I can filter from the right sidebar, but how can I do this from the 
search field itself?
(I am using XWiki 6.4)
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users