I am new to cyber security but I am working on a project where I need to use it and I don't know where to start.
The application I am working on connects to Jira to retrieve data and generate reports. For the connection, I want to use a specific username and password. I cannot set them as a string in my code because every user would get my credentials. So, I thought about writing an encrypted file.
The thing is if want to decrypt my file I will need to provide the decryption key in my code. and I think this is not secure at all because anyone that had access to the key could easily decrypt the file and therefore get my credentials.
I found a method that encrypts a file and makes it so that the only person that would decrypt is the user who encrypted it. The problem is that the admin is the only one who has the right to encrypt the files and this will only mean that he would be the only one for whom the connection to Jira would work as he is the only one able to decrypt the credentials.
I am also worried that if I read and decrypt the credentials then anyone could use a console.writeline
and get the credentials.
I am using c# for my application.
Are there any ways I can secure my credentials?
To connect and retrieve data from JIRA I need the username and password because I add them to my request header to connect and retrieve data.