can't access http://localhost:28017 when enable auth for mongod.

918 views
Skip to first unread message

amazo...@gmail.com

unread,
Jun 26, 2015, 4:33:39 AM6/26/15
to mongod...@googlegroups.com
i can't access http://localhost:28017 when  enable auth for mongod,it always pop up username/password even i fill correct username/passwd,i have enabled http & REST in initial parameter files,pls refer YAML format parameter file which i used

net:
   port: 27017
   http:
     enabled: true
     RESTInterfaceEnabled: true
security:
     authorization: enabled

But when i disable mongod authorization,then i can login http://localhost:28017 successfully and no need to fill username/password.

what's the reason?does it not support http console under authorization for 3.0?my version is 3.0.2,thanks.

Jorge Rúa

unread,
Jun 26, 2015, 4:40:24 AM6/26/15
to mongod...@googlegroups.com

Do not use localhost. DNS is your friend.

--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
 
For other MongoDB technical support options, see: http://www.mongodb.org/about/support/.
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user...@googlegroups.com.
To post to this group, send email to mongod...@googlegroups.com.
Visit this group at http://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/12d44f35-eeb4-425d-85fc-3258e7666368%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Stephen Steneker

unread,
Jun 26, 2015, 4:46:59 AM6/26/15
to mongod...@googlegroups.com, amazo...@gmail.com
On Friday, 26 June 2015 18:33:39 UTC+10, amazon.xia wrote:
i can't access http://localhost:28017 when  enable auth for mongod,it always pop up username/password even i fill correct username/passwd,i have enabled http & REST in initial parameter files,pls refer YAML format parameter file which i used

Hi,

The built-in HTTP and REST interfaces don't support the new SCRAM-SHA-1 authentication in MongoDB 3.0 (in fact the REST interface has no support for auth):

Both interfaces are disabled by default in MongoDB 3.0, and are only intended for development use at best as they are not secure. For general security best practices see: http://docs.mongodb.org/manual/administration/security-checklist/.

All of the information in the HTTP interface is available from MongoDB commands that you can either run in the mongo shell or from a driver. There are a number of REST solutions available and it's not uncommon to develop an application-specific REST API. Some common REST interfaces are listed at: http://mongodb-tools.com.

Regards,
Stephen
Reply all
Reply to author
Forward
0 new messages