Skip to content

fix auth: truncate with SecurityException & clear with Invalid user name admin - #1365

Merged
javeme merged 1 commit into
masterfrom
auth-clear-hugegraph
Mar 3, 2021
Merged

fix auth: truncate with SecurityException & clear with Invalid user name admin#1365
javeme merged 1 commit into
masterfrom
auth-clear-hugegraph

Conversation

@xuliguov5

Copy link
Copy Markdown
Contributor

No description provided.

@xuliguov5

Copy link
Copy Markdown
Contributor Author
java.lang.SecurityException: Not allowed to access system properties via Gremlin
	at com.baidu.hugegraph.security.HugeSecurityManager.newSecurityException(HugeSecurityManager.java:391) ~[hugegraph-core-0.11.2.jar:0.11.2.0]
	at com.baidu.hugegraph.security.HugeSecurityManager.checkPropertiesAccess(HugeSecurityManager.java:311) ~[hugegraph-core-0.11.2.jar:0.11.2.0]
	at java.lang.System.getProperties(System.java:630) ~[?:1.8.0_192]
	at com.alipay.common.tracer.core.configuration.SofaTracerConfiguration.getProperty(SofaTracerConfiguration.java:231) ~[tracer-core-3.0.8.jar:3.0.8]
	at com.alipay.common.tracer.core.configuration.SofaTracerConfiguration.getProperty(SofaTracerConfiguration.java:175) ~[tracer-core-3.0.8.jar:3.0.8]
	at com.alipay.common.tracer.core.reporter.digest.AbstractDiskReporter.isDisableDigestLog(AbstractDiskReporter.java:98) ~[tracer-core-3.0.8.jar:3.0.8]
	at com.alipay.common.tracer.core.reporter.digest.AbstractDiskReporter.doReport(AbstractDiskReporter.java:55) ~[tracer-core-3.0.8.jar:3.0.8]
	at com.alipay.common.tracer.core.reporter.facade.AbstractReporter.report(AbstractReporter.java:51) ~[tracer-core-3.0.8.jar:3.0.8]
	at com.alipay.common.tracer.core.SofaTracer.reportSpan(SofaTracer.java:141) ~[tracer-core-3.0.8.jar:3.0.8]
	at com.alipay.common.tracer.core.span.SofaTracerSpan.finish(SofaTracerSpan.java:165) ~[tracer-core-3.0.8.jar:3.0.8]
	at com.alipay.common.tracer.core.span.SofaTracerSpan.finish(SofaTracerSpan.java:158) ~[tracer-core-3.0.8.jar:3.0.8]
	at com.alipay.sofa.rpc.tracer.sofatracer.RpcSofaTracer.clientReceived(RpcSofaTracer.java:346) ~[sofa-rpc-all-5.7.6.jar:5.7.6]
	at com.alipay.sofa.rpc.tracer.Tracers.clientReceived(Tracers.java:175) ~[sofa-rpc-all-5.7.6.jar:5.7.6]
	at com.alipay.sofa.rpc.event.SofaTracerSubscriber.onEvent(SofaTracerSubscriber.java:59) ~[sofa-rpc-all-5.7.6.jar:5.7.6]
	at com.alipay.sofa.rpc.event.EventBus.handleEvent(EventBus.java:153) ~[sofa-rpc-all-5.7.6.jar:5.7.6]
	at com.alipay.sofa.rpc.event.EventBus.post(EventBus.java:123) ~[sofa-rpc-all-5.7.6.jar:5.7.6]
	at com.alipay.sofa.rpc.client.ClientProxyInvoker.invoke(ClientProxyInvoker.java:91) ~[sofa-rpc-all-5.7.6.jar:5.7.6]
	at com.baidu.hugegraph.auth.UserManager_proxy_0.findUser(UserManager_proxy_0.java) ~[?:0.58.0.0]
	at com.baidu.hugegraph.auth.HugeGraphAuthProxy.truncateBackend(HugeGraphAuthProxy.java:685) ~[hugegraph-api-0.11.2.jar:0.58.0.0]
	at com.baidu.hugegraph.HugeGraph$truncateBackend.call(Unknown Source) ~[?:?]
	at Script3.run(Script3.groovy:1) ~[?:?]
	at org.apache.tinkerpop.gremlin.groovy.jsr223.GremlinGroovyScriptEngine.eval(GremlinGroovyScriptEngine.java:674) ~[gremlin-groovy-3.4.3.jar:3.4.3]
	at org.apache.tinkerpop.gremlin.groovy.jsr223.GremlinGroovyScriptEngine.eval(GremlinGroovyScriptEngine.java:376) ~[gremlin-groovy-3.4.3.jar:3.4.3]
	at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:233) ~[?:1.8.0_192]
	at org.apache.tinkerpop.gremlin.groovy.engine.GremlinExecutor.lambda$eval$0(GremlinExecutor.java:266) ~[gremlin-groovy-3.4.3.jar:3.4.3]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_192]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_192]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_192]
	at com.baidu.hugegraph.auth.HugeGraphAuthProxy$ContextTask.run(HugeGraphAuthProxy.java:1565) [hugegraph-api-0.11.2.jar:0.58.0.0]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_192]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_192]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_192]

@xuliguov5
xuliguov5 force-pushed the auth-clear-hugegraph branch from a34ba24 to da6c7d2 Compare February 23, 2021 10:20
@javeme

javeme commented Feb 23, 2021

Copy link
Copy Markdown
Contributor

error: gremlin can't read java.specification.version:
image

@javeme

javeme commented Feb 23, 2021

Copy link
Copy Markdown
Contributor

error: Invalid user name admin:
image

@javeme javeme changed the title Modifying UserManagerProxy causes hugegraph data cleanup issues fix auth: truncate with SecurityException & clear with Invalid user name admin Feb 23, 2021
@codecov

codecov Bot commented Feb 23, 2021

Copy link
Copy Markdown

Codecov Report

Merging #1365 (da6c7d2) into master (7f63b57) will increase coverage by 0.00%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #1365   +/-   ##
=========================================
  Coverage     62.38%   62.39%           
  Complexity     5817     5817           
=========================================
  Files           385      385           
  Lines         31922    31922           
  Branches       4451     4451           
=========================================
+ Hits          19916    19918    +2     
  Misses         9984     9984           
+ Partials       2022     2020    -2     
Impacted Files Coverage Δ Complexity Δ
...a/com/baidu/hugegraph/auth/HugeGraphAuthProxy.java 3.98% <0.00%> (ø) 0.00 <0.00> (ø)
.../baidu/hugegraph/security/HugeSecurityManager.java 80.21% <ø> (ø) 83.00 <0.00> (ø)
...a/com/baidu/hugegraph/backend/query/Condition.java 78.83% <0.00%> (+0.72%) 32.00% <0.00%> (ø%)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7f63b57...da6c7d2. Read the comment docs.

@javeme
javeme merged commit 964daf1 into master Mar 3, 2021
@javeme
javeme deleted the auth-clear-hugegraph branch March 3, 2021 07:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants