Skip to content

Unexpected credential problems #36

Description

@ptaconet

Hi,

I am trying to insert metadata to a local instance of Geonetwork but I get an unexpected credential problems.

When I try to connect using :

GN <- GNManager$new(
  url = "http://localhost/geonetwork",
  user = "un", pwd = "pwd",
  version = "4.4.5",
  logger = 'DEBUG'
)

I get [geonapi][INFO] Successfully authenticated to GeoNetwork! whatever the user and pwd I provide (either right or wrong).

Then, when I try to import a metadata with GN$insertMetadata, I get "Forbidden (HTTP 403)." (even with the right credentials).

However I am able to read a metadata sheet with GN$getMetadataByUUID(id).

Also :

library(httr)
res <- GET(
    url = "https://localhost/geonetwork/srv/api/info",
    authenticate("good_username", "good_password"),
    config(ssl_verifypeer = FALSE)  # skip TLS check if needed
)

content(res)

leads to :

{xml_document}
<info>
[1] <env>\n  <baseURL>/geonetwork</baseURL>\n  <node>srv</node>\n</env>

while :

library(httr)
res <- GET(
    url = "https://localhost/geonetwork/srv/api/info",
    authenticate("bad_username", "bad_password"),
    config(ssl_verifypeer = FALSE)  # skip TLS check if needed
)

content(res)

leads to :

raw(0)

which is the expected behavior (response with good vs wrong credentials), and makes me believe that the error may come from geonapi.

Any idea ?

I am using a Geonetwork instance installed through a Docker version of Georchestra (https://github.com/georchestra/docker). Manual insertion of metadata through the GUI works well.

You may find enclosed the detailed logs (output of logger = 'DEBUG')

Thanks for the help !

logs.txt

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions