Preamble: This might be a giant noob mistake, all the developers on my team are a little fuzzy at the Java 101 here so if we're worrying about nothing please let me know. [worried about String literals cached in permgen to be specific]
We have a simple login page that basically looks like: //Backing Bean "LoginBean"
String username;
String password;
//getter/setter pairs
//JSF
<h:form id="login">
<h:inputText value="#{loginBean.username} />
<h:inputSecret value="#{loginBean.password} />
<h:commandButton actionListener="#{loginBean.login} />
</h:form>
My concern here is that a string literal being passed could be cached and opens potential security holes. Is there a ways to set this up so that we bypass a string literal entirely? If this were a Swing application I'd be using JPasswordField which explicitly has "char[] getPassword();"
or in code I want:
String username;
char[] password;
Thanks for the help, if it is a double post feel free to slap me, I can't seem to find it but it seems like a core issue.