Pulling the data from the encrypted data bag and then storing it in as an attribute on a node exposes the data to anybody that can view the node details. The better approach is to store this and then pass it in as a variable to the template.