"Is it possible to convert a text field to a password field type using ScriptRunner Behaviours?"
Hi Maru,
I assume you mean a field that you can type something into, but the browser never displays the content, traditionally just showing a number of stars unrelated to the actual string length.
As @Rebekka Heilmann _viadee_ points out, it's insecure, you should never be storing passwords in Jira (or anywhere other than a highly secured password safe). At a minimum, you should be storing the salt and hash of a password so that the actual password is never sent over the network.
Anyway, you can do something like that with Behaviours, changing the display text to *s, but do not bother. You have a series of problems with it:
What you need to do is find a secured password field type. I wrote one for Jira 3 once, but only for a "password reset" process done within Jira - the password entered was never stored or sent (the salt and hash were sent over a secured local route to another system), the code threw the plain-text away before the issue got written to. Looked odd in the database - "this custom field is used in these projects, but there are no values for it anywhere"
If you really do want to store passwords in Jira properly, you'll need to add code to that field so that it stores the salt and hash of what is entered and then write more code to let Jira act as a password checker.
The basic process of that is:
Again, you could do this with Scriptrunner, but I really recommend that you look for software designed to store passwords securely - Jira isn't the right place.
Hi Maru,
No, you cannot change the types of fields in Jira. You will need to create a new field with the new type and migrate any data to the new field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Why do you need a password field in Jira? I wouldn't recommend saving data like passwords in Jira, so hence the question.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Rebekka Heilmann _viadee_
To meet the requirements of my use case, I require a custom field type specifically designed for passwords.
If a custom field type specifically designed for passwords is not available, an alternative solution would be to hide the values entered by end-user.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Should be doable with ScriptRunner. @Nic Brough -Adaptavist- and colleagues should be able to help with that.
Still. Highly recommend NOT to save passwords in Jira. Custom Fields are not encrypted. Especially as you still seem to be on a Server License and with recent Security Issues.... With EoL approaching it is to be expected that more Vulnerabilities will pop up.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.