[Koha] Koha Rest API basic authentication failure - URGENT
Tomas Cohen Arazi
tomascohen at gmail.com
Tue Dec 29 11:32:33 NZDT 2020
Does the user have staff privileges?
On Mon, Dec 28, 2020, 17:57 ravikumar c <ravikumarc2002 at gmail.com> wrote:
> Hi All
>
> Any feedback for below issue? Not sure what is plack and if any separate
> configuration is required what needs to be done.
> Not able to make simple functionality of Rest API work. Tried all possible
> solutions from net.
>
> On Mon, Dec 28, 2020 at 6:19 AM ravikumar c <ravikumarc2002 at gmail.com>
> wrote:
>
> > Password is just 8 characters. Tried querying API thru postman and curl
> > both. Query fails for both the cases.
> > Anyone knows if rest basic authentication is compatible with ubuntu or
> > not? Also Using the Koha REST API - Koha Wiki (koha-community.org)
> > <https://wiki.koha-community.org/wiki/Using_the_Koha_REST_API> indicates
> > *RESTBasicAuth* only works when using Plack; it will not work when using
> > CGI. Any idea what needs to be done for this? I simply downloaded latest
> > koha and configured in ubuntu, enabled *RESTBasicAuth* = True and tried
> > querying thru postman as well as curl. Koha version I am using is 20.11,
> > password is just 8 characters. Similar thing works with
> > https://intranet.bywatersolutions.com/api/v1/cities but it doesn't
> > work with my installation. Is there any additional settings needs to be
> > changed in koha-sites.conf, koha-common.conf or koha-httpd.conf?
> Appreciate
> > any help. Thanks in advance.
> >
> > Regards
> > Ravikumar
> >
> > On Mon, Dec 28, 2020 at 5:13 AM Joonas Kylmälä <
> joonas.kylmala at helsinki.fi>
> > wrote:
> >
> >> Hi,
> >>
> >> one possible reason is too long password, I know that at least <= 32
> >> characters work.
> >>
> >> Joonas
> >>
> >> On 27/12/2020 15:41, ravikumar c wrote:
> >> > Hi All
> >> >
> >> > I have been facing a strange issue using Koha API basic
> >> authentication
> >> > since last 1 month for which I need urgent help. Tried all possible
> >> > suggestions found on net but no luck.
> >> >
> >> > If I enable "RESTBasicAuth" try the basic curl command like below
> for
> >> the
> >> > bywater demo site , things work absolutely fine with no issues.
> >> >
> >> > $ curl -u bywater:bywater -i -H 'Accept:application/json'
> >> > https://intranet.bywatersolutions.com/api/v1/cities
> >> >
> >> > Response - EVERYTHING SEEMS SO EASY.
> >> >
> >> >
> >>
> [{"city_id":3,"country":"","name":"Chicago","postal_code":"60601","state":"IL"},{"city_id":4,"country":"","name":"Chicago","postal_code":"60611","state":"IL"},{"city_id":5,"country":"","name":"Austin","postal_code":"78741","state":"TX"},{"city_id":6,"country":"INDIA","name":"habra","postal_code":"743222","state":"WEST
> >> > BENGAL"}]
> >> >
> >> > But if I try the same with my local ubuntu installation of Koha it
> >> doesn't
> >> > work even after enabling "RESTBasicAuth".
> >> >
> >> >
> >> > HTTP/1.1 401 Unauthorized
> >> > Date: Sun, 27 Dec 2020 13:29:39 GMT
> >> > Server: Apache/2.4.41 (Ubuntu)
> >> > Content-Length: 35
> >> > Content-Type: application/json; charset=utf8
> >> >
> >> > {"error":"Authentication failure."}
> >> >
> >> > Appreciate your help as I need this asap.
> >> >
> >> > Regards
> >> > Ravikumar
> >> > _______________________________________________
> >> >
> >> > Koha mailing list http://koha-community.org
> >> > Koha at lists.katipo.co.nz
> >> > Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
> >> >
> >>
> >> --
> >> Joonas Kylmälä
> >> Tietojärjestelmäasiantuntija
> >>
> >> Kansalliskirjasto
> >> Kirjastoverkkopalvelut
> >> PL 15 (Unioninkatu 36)
> >> 00014 Helsingin yliopisto
> >>
> >
> _______________________________________________
>
> Koha mailing list http://koha-community.org
> Koha at lists.katipo.co.nz
> Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
>
More information about the Koha
mailing list