Seems to me that you want to do something impossible. As I understand it, there are the following options for using JIRA content inside Confluence:
- Use the authenticated user of Confluence in JIRA.
- Use an anonymous user for public issues in JIRA.
- Use a pre-determined user (not recommended): This will show in public the user name and password in Confluence.
So you have the following options:
- Use issue security in JIRA, and set the comments in your issues only be available for a special group.
- Ensure that the users you want to get access to are not contained in the special group.
See the documentation about "Trusted Communication", especially the following part:
Display the JIRA issues which the logged-in user is authorised to see. And if the user is not logged in, display only issues which allow unrestricted viewing.