Support API certificate

(from github.com/buithehien1991)
Could you please provide search API with authentication ?
for example: http://localhost:8080/search/?q=test&username=admin&password=admin
or create a authenticate access key like:
http://localhost:8080/search/?q=test&AUTH_KEY=sadafadfacadf54adf21cadadfad

username/password/AUTH_KEY can be pass via POST method

I want each user can be search on each site. If you have another way, please tell me.

Thank you so much for your answer

(from github.com/marevol)
You can use Access Token.

  1. Create Crawling Config with a permission(ex. {role}search)
  2. Create Access Token with {role}search and AUTH_KEY as Parameter Name
  3. Access http://localhost:8080/search/?q=test&AUTH_KEY=

(from github.com/buithehien1991)
Dear @marevol

I used Fess 12.1.4. So I can’t find this section.
What version of fess you added this section ?

Thank you and regards,
Bui The Hien

(from github.com/buithehien1991)

You can use Access Token.

Create Crawling Config with a permission(ex. {role}search)
Create Access Token with {role}search and AUTH_KEY as Parameter Name
Access http://localhost:8080/search/?q=test&AUTH_KEY=

Thank you so much for your answer.
Did we do the same with FSS http://localhost:8080/json?.… right?

(from github.com/marevol)

What version of fess you added this section ?

See https://fess.codelibs.org/12.1/admin/accesstoken-guide.html

Did we do the same with FSS http://localhost:8080/json?.… right?

Yes.

(from github.com/buithehien1991)
Dear @marevol

I already create a token for user admin


And turn on Login required, access http://localhost:8080/search/?q=tsdv&num=10&sort=&TOKEN=i8nspvlxW40nLli95moLufJwLxMvWWW2peTvZ4wMS3bL3ZhLQpQpJNUojtck

  1. When I logged in as admin or guest user. Search is ok.
    I go to the Search Log. I also can’t found diffirent of search link when have TOKEN and no have TOKEN paramenter. Could you please add more field (example: Parameters ) to Search log or any way to know it?

  2. When I logged out admin account. I access on above link and Login page will be show. I think this case search is OK.

Please correct me when I was wrong.
Thank you so much for your help.
Best regards