Giter VIP home page Giter VIP logo

Comments (4)

bobbeck55 avatar bobbeck55 commented on September 6, 2024

Here are the quack logs and the system authorization log (/var/log/auth.log)

quack_errors_log.txt
auth.log

from quack.

bobbeck55 avatar bobbeck55 commented on September 6, 2024

exception in monitor thread no longer happening.
when I do -
docker exec -it mongod bash
mongo
show users - nothing is displayed but I added user "bob"

from quack.

azee avatar azee commented on September 6, 2024

@bobbeck55 What is set up in your config file as an auth and session providers?
https://github.com/greatbit/quack/blob/master/api/src/main/resources/quack.properties#L13-L14

Docker compose starts mongo and QuAck in a single stack. It was created solely for demo purposes only. If you want to run QuAck as a prod service you'll need a real Mongo replica set and few QuAcks as failovers and for balancing.

In docker-compose all configurations are default and are meant to serve demo purposes only.
StubAuthProvider and InmemSessionProvider would be set up by default in property file.

StubAuthProvider only authenticates admin by credentials specified in property file (stub and admin)
https://github.com/greatbit/quack/blob/master/api/src/main/resources/quack.properties#L15-L21

If you want to be able to create users in your database - change authProvider to
whoru.auth.provider=com.testquack.api.security.DbAuthProvider
It will still allow using admin credentials from property file but will allow users creation as well.

If you'll have more than one instance of QuAck running in a cluster, you also have to update a session provider to a HazelcastSessionProvider so that sessions would be in sync on all nodes:
whoru.session.provider=ru.greatbit.whoru.auth.providers.HazelcastSessionProvider

In case you have AWS and you want to enable authentication through google or other social services - you can use CognitoAuthProvider. It works with AWS Cognito. Please let me know if interested - I'll guide you.

from quack.

azee avatar azee commented on September 6, 2024

Now for the configuration. QuAck loads quack.properties file from 2 locations. First - resources. The one that you get by default. If you want to override properties (and in our case we want to override authPrpvider) - you can create your own quack.properties file and override desired properties there.

If you are running quack using docker (in our case it is so - docker compose) - quack will read the overridden quack.properties file from /etc/quack/quack.properties.
You can map docker container /etc/quack folder to whatever folder you have on your host. Just put your custom quack.properties file into that folder and map it in docker-compose.yaml like

volumes:

  • PATH_TO_DIRECTORY_WITH_PROPERTIES:/etc/quack

from quack.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.