Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

About RMI Security

 
peng qingtao
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i noticed a sentence in my instructions as following:
"You must not require the installing of a security manager".
Does it mean that i shouldn't use the code in my project as following:

if (System.getSecurityManager() == null) {
System.setSecurityManager( new RMISecurityManager() );
}
and what's more,during the running of rmi system,the user may be
required to modify the file of ".java.policy".I am afraid of an
automatic failure generated because of this requirement.
Could anyone here give me an answer?
Thanks!
 
George Marinkovich
Ranch Hand
Posts: 619
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Peng,
Originally posted by peng qingtao:
i noticed a sentence in my instructions as following:
"You must not require the installing of a security manager".
Does it mean that i shouldn't use the code in my project as following:

if (System.getSecurityManager() == null) {
System.setSecurityManager( new RMISecurityManager() );
}
and what's more,during the running of rmi system,the user may be
required to modify the file of ".java.policy".I am afraid of an
automatic failure generated because of this requirement.

Yes, I think it means that you shouldn't use any code that references a security manager. Also, your instructions probably say something like:
You must not require manual editing of any files by the examiners.
which could be a problem if the user is required to modify the ".java.policy" file (or any other file for that matter). I suspect using a security manager would be grounds for automatic failure. There's one way to find out for sure, but I'm certain you don't want to find out that way. My advice is to take the prohibition against a security manager in your assignment instructions seriously and not use one.
 
peng qingtao
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for George's reply.

i am not going to use SecurityManager.But i wish the system wouldn't report
me the Exceptions such as SocketPermission or FilePermession
 
George Marinkovich
Ranch Hand
Posts: 619
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Peng,
Originally posted by peng qingtao:
i am not going to use SecurityManager.But i wish the system wouldn't report
me the Exceptions such as SocketPermission or FilePermession

I don't remember getting the exceptions you mention. Are you building your application in an IDE that uses a security manager by default? If you build your application from the command line do you still see these exceptions?
 
peng qingtao
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for George's careful reply.
i've made a mistacke.
Just like what you said,if i don't use SecurityManager,no exception was
throwed.
Thanks for the additional advice!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic