Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OSecurityException trying to change admin username #7245

Closed
lucafrosini opened this issue Mar 17, 2017 · 5 comments
Closed

OSecurityException trying to change admin username #7245

lucafrosini opened this issue Mar 17, 2017 · 5 comments

Comments

@lucafrosini
Copy link
Contributor

OrientDB Version: 2.2.17

Java Version: 1.8.0_121

OS: Ubuntu 16.10

I connect as admin to db and then I try to change admin username on save I get the following exception.

Please also note that the logging is also writing the metadata to have a colourized output on console $ANSI{green {db=gcube}}

$ANSI{green {db=gcube}} securityRecordChange() Exception: 
com.orientechnologies.orient.core.exception.OSecurityException: User 'gcube' has no status
	DB name="gcube"
	at com.orientechnologies.orient.core.metadata.security.OUser.getAccountStatus(OUser.java:239)
	at com.orientechnologies.orient.core.metadata.security.OImmutableUser.<init>(OImmutableUser.java:36)
	at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.reloadUser(ODatabaseDocumentTx.java:1011)
	at com.orientechnologies.orient.server.security.ODefaultServerSecurity$2.run(ODefaultServerSecurity.java:558)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)

Steps to reproduce

OrientGraphFactory factory = new OrientGraphFactory("dburl", "admin", "admin").setupPool(1, 10);
OrientGraphNoTx orientGraphNoTx = factory.getNoTx();

OMetadata oMetadata = orientGraphNoTx.getRawGraph().getMetadata();
OSecurity oSecurity = oMetadata.getSecurity();
			
OUser admin = oSecurity.getUser("admin");
admin.setName("MyNewAdminName");
admin.save();

and even if I do (maintaining the original connection)

OUser reader = oSecurity.getUser("reader");
reader.setPassword("mySecurePassword");
reader.save();

@wolf4ood
Copy link
Member

wolf4ood commented Apr 5, 2017

hi @lucafrosini

is the url remote or plocal ?

@lucafrosini
Copy link
Contributor Author

remote

@lucafrosini
Copy link
Contributor Author

lucafrosini commented Apr 20, 2017

Just to be clear and more precise.
The url is in the form
remote:node01.mydomain.com;node02.mydomain.com;node03.mydomain.com;

The storage mode is:
plocal

@lucafrosini
Copy link
Contributor Author

My workaround was to create a new admin user.
If you want you can close the ticket

@luigidellaquila
Copy link
Member

Great, closing then

Thanks!

Luigi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants