Comments (10)
The same thing happens here when MONGO_DBNAME is different from what is specified in the URI via authSource=. The auth source from the URI gets overwritten by MONGO_DBNAME. Workaround is to not use MONGO_URI at all but use MONGO_HOST, MONGO_PORT & MONGO_AUTH_SOURCE with MONGO_USERNAME and MONGO_PASSWORD together with MONGO_DBNAME
from eve.
hi @smeng9 I'll be happy to review your PR
from eve.
Hello All,
I'm using Atlas free and it requires srv
in URI. Since there is a problem with URI in Eve, how can I stop using URI? Where should I put srv
without the URI?
Thanks!
from eve.
I've ran into this issue today when learning Eve.
Eve changes authSource
from default admin
to eve
. I've ran debugger and check step-by-step what is the difference between connecting with bare pymongo and connecting with Eve. There is only one difference: source
set to eve
. I don't know how it is being set. It is not set by my code and there is no authSource="eve" in Eve sources [1]. Eve changes connection parameters in a way it can no longer authenticate. There is no hint in the documentation that setting authSource in URI does not work.
URI below works without problems when using pymongo:
mongodb+srv://myName:[email protected]/?authSource=admin
But Eve changes it under the hood to:
mongodb+srv://myName:[email protected]/?authSource=eve
Edit:
[1] I found it is being set from __package__
variable value.
I've made some changes to make this comment look less offensive. Sorry guys for my bad attitude yesterday. I really appreciate this project and your hard work.
from eve.
from eve.
I have an idea that maybe we could inject MongoClient instance into Eve. In that way we can move responsibility of handling mongodb connection from Eve to pymongo. It would fix this issue and perhaps prevent other connection issues in the future.
It could be used in settings.py
like this:
from pymongo import MongoClient
MONGO_CLIENT = MongoClient("mongodb+srv://...")
from eve.
Hi all, I just merged #1482. Can you please check current master and confirm if it fixes the problem for you?
from eve.
Hello Nicola,
Yes, it fixes the issue immediately. Now I can specify authSource
and it is being recognized. The second amazing fact is, I don't need to specify authSource
and it is set to admin
. I think it is taken from DNS thanks to srv
.
It looks like this old issue is resolved. Thanks!
Can somebody paste link to this solution here in discussion from 2018: https://groups.google.com/g/python-eve/c/9eJjCSy7wy0 ?
from eve.
from eve.
@micheloe I don't know if Eve supported srv
or authSource taken from URI in the past, but I think the issue is now resolved thanks to #1482 and there is no need to downgrade to 1.1.5.
from eve.
Related Issues (20)
- Is there a way to get jsonschema using the API? HOT 1
- Issue with query_objectid_as_string on Eve>=1.0.1 HOT 7
- Release HOT 1
- 422 UNPROCESSABLE ENTITY when using user_id and data_relation on PATCH HOT 1
- Render fails because recent version of Werkzeug has removed escape() method from utils HOT 6
- HATEOAS links are relative starting with Werkzeug 2.1; should be absolute for backward compatibility HOT 1
- Werkzeug utils has no attribute escape. HOT 1
- Add support to release Linux aarch64 wheels HOT 2
- deleteitem_internal on media resource, KeyError: 'media'
- Tests fail with Flask 2.2 HOT 2
- etag generation fails if 'uuidRepresentation' is not set in MONGO_OPTIONS HOT 1
- Malformed Last Updated field HOT 7
- How to get in touch regarding a security concern HOT 1
- [Feature Request] One document Endpoint HOT 1
- pass var to a pipeline aggregation via url and regex HOT 1
- Replace vs Merge Update on PATCH
- CI failure: `mongo command not found` on ubuntu-latest (22.04)
- Tests folder in eve distribution HOT 3
- Type serialization does not work inside valuesrules or valueschema
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eve.