orientechnologies / orientdb-docker

OrientDB running in a docker container
MIT License
63 stars 63 forks source link

Latest docker image has basic auth restricting from doing anything from the studio #26

Closed decebal closed 7 years ago

decebal commented 7 years ago

I am setting up the docker image using the environment variables, but when the basic auth comes up I don't have any other credentials that I can setup

robfrank commented 7 years ago

I don't understand very well the issue. BTW, I try to give a solution.

AFIU you run the container providing password for the root user. On the landing page, with these credentials, you can create a new database, and then login with admin/admin credential on the just created database. Studio documentation: http://orientdb.com/docs/last/Studio-Home-page.html

Anyway, please provide orientdb version, command used to launch and any other detail that can help . thanks

decebal commented 7 years ago

Thanks for the answer Rob, but it's really frustrating for me at this point as I am new to this and I can't find a image that just works.

Steps to reproduce the issue I'm having:

  1. use orientdb:latest with docker-compose, open the studio interface
  2. try to create a new database from the studio interface, introduce database name, username and password
  3. basic auth pops up .. tried admin:admin , root:root, root:{ORIENTDB_ROOT_PASSWORD}
robfrank commented 7 years ago

Please, provide the docker compose configuration. I guess you're not setting the root password.

decebal commented 7 years ago

Thanks for drilling down on this Rob, you're right, there were issues raised about the root password not being set, I have set the password, to check it I also got a sh prompt inside the container and my environment has it set.

This is my yaml file, in case you find it useful:

    dev-orientdb:
        image: orientdb:latest
        environment:
            - ORIENTDB_ROOT_PASSWORD=root
            - ORIENTDB_NODE_NAME=my_shiny_database
        volumes:
            - '../../containers/db/orientdb:/orientdb/databases'
            - '../../containers/orientdb/backup:/orientdb/backup'
        ports:
          - "2424:2424"
          - "2480:2480"
        expose:
          - "2424"
          - "2480"
        entrypoint:
          - "server.sh"

From my understanding after going through some configuration files, it has nothing to do with that password, but I don't know where the basic auth comes from.. maybe it's from the studio install (the zip file).

robfrank commented 7 years ago

My suggestion is to delete the container instance and let compose rebuild it. Then, on localhost:2480, try to create a new database using server credentials root/root. then, login using admin/admin on the just created database

decebal commented 7 years ago

Hi Rob, Thank you for your suggestion, but that is not a valid solution, neither does it work or make sense.

What I am after is an environment variable that I can set or a config file that I can modify and mount as a volume. The studio plugin is installed from a zip file that rests in /orientdb/plugins and I have no clue how it gets there :( , but it would be a welcomed addition if I could use it.

First screen of the studio plugin install

First screen of my studio install

popup for creating a new database

popup for creating a new database

my basic authentication nightmare

my basic authentication nightmare

robfrank commented 7 years ago

apart for the basic auth, if you reload the page, pointing to localhost:2480, are you able to login to the created database and work on it?

decebal commented 7 years ago

no Rob, I can't use the studio at all, I am using the console at the moment, but for every operation in the studio I get the basic auth popup and I am denied access to everything, including creating a new database and accessing one that I created from the console.

robfrank commented 7 years ago

I just launched with this command:

docker run --rm -ti -p 2480:2480 -p 2430:2430 orientdb:latest

then I went to localhost:2480, created a new db called test. No basic auth popped up.

I'm on a mac, docker 1.13.0, orientdb:latest is 2.2.16, chrome browser.

Let me know you configuration, please.

decebal commented 7 years ago

Apparently you were right about that password. I just cleaned up all my orientdb pieces from docker just to make sure, ran a new install and this little info message was to be found between all the info messages memoria-dev-orientdb_1 | 2017-02-13 17:50:20:349 INFO Found ORIENTDB_ROOT_PASSWORD variable, using this value as root's password [OServer] I have a very similar environment to what you just described, btw (just ubuntu 16 instead of mac).

Thanks for the patience Rob.