[SERVER-258] Read-only user Created: 25/Aug/09  Updated: 12/Jul/16  Resolved: 02/Feb/10

Status: Closed
Project: Core Server
Component/s: Admin
Affects Version/s: None
Fix Version/s: 1.3.2

Type: Improvement Priority: Minor - P4
Reporter: Mathias Stearn Assignee: Aaron Staple
Resolution: Done Votes: 4
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:

 Description   

It would be nice if the auth system supported both full-access users and read-only accounts. Even better if you can support requiring auth only for modification and not for queries, eval, group, etc. There would need to be some way to prevent modification even in server-side JS code.

I'm working on an internal web front-end to query the db and it would be great if users could safely write their own group-by queries when the provided aggregators prove insufficient. If I allow that now there is a risk that they could destroy data.



 Comments   
Comment by michael haraburda [ 15/Mar/12 ]

I agree with Mr. Waldvogel. I believe this is a useful option, and I interpreted the option the same as he did (i.e. only write operations require authentication, not that some users can only write..) Will this be reconsidered/should a new ticket be opened?

Comment by Benedikt Waldvogel [ 24/Feb/12 ]

I understood --authWriteOnly differently. In the wiki I found the following sentence:
"To run the database with security checking for writes only, use the --authWriteOnly option."

Which makes totally sense to me and is actually the exact use case that I have:
Unauthenticated users should be able to perform read-only operations. But as soon as a write operation is done, it will fail unless the user is authenticated.

Comment by Eliot Horowitz (Inactive) [ 24/Feb/12 ]

Write only users don't make much sense in the general case as you can't see what you write, and trying to keep number of options smaller.

Comment by Benedikt Waldvogel [ 24/Feb/12 ]

What is the reason that --authWriteOnly was removed?

Comment by auto [ 08/Feb/10 ]

Author:

{'login': 'astaple', 'name': 'Aaron', 'email': 'aaron@10gen.com'}

Message: SERVER-258 removing --authWriteOnly mode at Eliot's request
http://github.com/mongodb/mongo/commit/04ef27cb4f32c5f17f70d19ca003ce72c0d5e35b

Comment by auto [ 02/Feb/10 ]

Author:

{'login': 'astaple', 'name': 'Aaron', 'email': 'aaron@10gen.com'}

Message: SERVER-258 add test for copying a database
http://github.com/mongodb/mongo/commit/7bc4b39c8c28a1094374172ef49f5bf8fdc62d1d

Comment by auto [ 02/Feb/10 ]

Author:

{'login': 'astaple', 'name': 'Aaron', 'email': 'aaron@10gen.com'}

Message: SERVER-258 test debug
http://github.com/mongodb/mongo/commit/95574b3c9ec842ac7636be8e8013150f110e2a59

Comment by auto [ 02/Feb/10 ]

Author:

{'login': 'astaple', 'name': 'Aaron', 'email': 'aaron@10gen.com'}

Message: SERVER-258 test debug
http://github.com/mongodb/mongo/commit/a34be8d49938beec19ed83769537483013d8d581

Comment by auto [ 02/Feb/10 ]

Author:

{'login': 'astaple', 'name': 'Aaron', 'email': 'aaron@10gen.com'}

Message: SERVER-258 group work with read only mode
http://github.com/mongodb/mongo/commit/53998ac7fc1058ded4eebbb94cba940521446f5e

Comment by auto [ 02/Feb/10 ]

Author:

{'login': 'astaple', 'name': 'Aaron', 'email': 'aaron@10gen.com'}

Message: SERVER-258 make db.eval work with read only mode
http://github.com/mongodb/mongo/commit/946d42e8e718d0e11ab3389c286b5ae41a23d5e7

Comment by Aaron Staple [ 28/Jan/10 ]

Oops, should have read the bug more carefully. This doesn't work for db.eval or group() yet.

Comment by Aaron Staple [ 26/Jan/10 ]

You can now give a user read only access by setting the readOnly field in the user config object to true. So, for example:

{ "user": "foo", "pass": "...", "readOnly": true }

There's also a new --authWriteOnly option where only writes have security checking.

Comment by auto [ 26/Jan/10 ]

Author:

{'login': 'astaple', 'name': 'Aaron', 'email': 'aaron@10gen.com'}

Message: SERVER-258 current op should probably be read only authorized afterall
http://github.com/mongodb/mongo/commit/2fc5cd666f9906911fc66f7c18ac9c397989bc5b

Comment by auto [ 26/Jan/10 ]

Author:

{'login': 'astaple', 'name': 'Aaron', 'email': 'aaron@10gen.com'}

Message: SERVER-258 add authWriteOnly mode
http://github.com/mongodb/mongo/commit/6ba9f4c9bc4556e3c99d1253ccd18c0011ca9e3b

Comment by auto [ 26/Jan/10 ]

Author:

{'login': 'astaple', 'name': 'Aaron', 'email': 'aaron@10gen.com'}

Message: SERVER-258 add smokeAuth target
http://github.com/mongodb/mongo/commit/990092ce3d105d88a5f857e7c2dd196868324dcf

Comment by auto [ 26/Jan/10 ]

Author:

{'login': 'astaple', 'name': 'Aaron', 'email': 'aaron@10gen.com'}

Message: SERVER-258 add readOnly auth mode
http://github.com/mongodb/mongo/commit/dcce5e795e5728214d6973a2e4f7168d05b22ecf

Comment by Mathias Stearn [ 03/Dec/09 ]

Read-Write Lock work should make implementing read-only users pretty easy

Generated at Thu Feb 08 02:53:33 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.