During insertion of a plugin macro in Confluence page, a password is input through Macro Browser by the editor of the page and the password remains exposed to other editor of the same Confluence page.
That's why it's better to mask the password. But the parameter options seem to have no such facilities presently.
What I need is support for type="password" as parameter options.
If suitable parameters option is not available, what is the alternative?
So, there are a couple things that you should think about regarding this since you are developing the add-on yourself. If you truly want to hide the password from your users, then you probably don't want to do this the way you are thinking as the password would be stored in clear text in the Confluence storage format (which is easily accessible from https://yourserver/plugins/viewstorage/viewpagestorage.action?pageId=#####). Not only that your users could easily get the password with a very small amount of javascript run from the browser's dev console. A more typical approach would be to create a place in Confluence Admin where an admin could create canned SQL connections. Then in your macro you provide your users a drop down to select which connection they want. That would be a better method to secure your passwords. The way you are going about it would not be secure at all.
I'm using confluence SDK environment for plugin development. My plugin is based on the setup created by the command "atlas-create-jira-plugin-module".
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What is the add-on name, or is this something y'all have made yourselves?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It's a macro plugin for Confluence to query external database. Its parameter list goes like this in file "atlassian-plugin.xml":
<xhtml-macro name="database-query" class="com.atlassian.tutorial.macro.DatabaseQuery" key="database-query-macro">
<description key="database-query.macro.desc"/>
<category name="formatting"/>
<parameters>
<parameter name="Database_Type" type="enum">
<value name="MySql"/>
<value name="Oracle"/>
</parameter>
<parameter name="Host_Name" type="string"/>
<parameter name="Port" type="string"/>
<parameter name="SID_or_DB" type="string"/>
<parameter name="User_Name" type="string"/>
<parameter name="Password" type="username"/>
<parameter name="SQL" type="string"/>
</parameters>
At the end macro (JAR file) is added by add-on manager. When the macro is inserted to a Confluence page, Macro browser is opened to get the parameters (before preview).
The macro plugin works fine. Only problem is password field is exposed to other users also because it's not masked (what is done by a type "password" filed in html).
Is my description of the problem enough to understand?
Please reply.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What macro of what add-on is this for?
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.