security

What's the most secure way to authenticate background queue workers using IdentityServer 4?

扶醉桌前 提交于 2019-12-23 01:52:54
问题 I have tasks that are placed onto a background queue for async processing. The standalone queue worker needs to authenticate to a separate API using IdentityServer 4, essentially "impersonating" the original user that triggered the task. The two options I can see for doing this are: Push the access and refresh tokens of the user into the queue's payload, and use these to authenticate when the task is picked up and executed. The main issue with this is that the queue's payload is stored in a

PHP: Any logical use cases for include/requiring remote source files?

心不动则不痛 提交于 2019-12-23 01:52:28
问题 http://www.php.net/manual/en/features.remote-files.php The only time I could ever think of doing include("http://someotherserver/foo.php") would be as some sort of weird intra-server service interface, but even then I could think of a million different ways that were safer to accomplish the same thing. Still, my specific question is, has anyone seen remote includes in a production environment and did it make any sense doing so? Edit: To clear something up, I would cause physical injury to

Is URLEncoder.encode(string, “UTF-8”) a poor validation?

旧时模样 提交于 2019-12-23 01:45:09
问题 In a portion of my J2EE/java code, I do a URLEncoding on the output of getRequestURI() to sanitize it to prevent XSS attacks, but Fortify SCA considers that poor validation. Why? 回答1: The key point is that you need to convert HTML special characters to HTML entities. This is also called "HTML escaping" or "XML escaping". Basically, the characters < , > , " , & and ' needs to be replaced by < , > , " , & and ' . URL encoding does not do that. URL encoding converts URL special characters to

Multiple hostnames and multiple privileges?

南笙酒味 提交于 2019-12-23 01:42:10
问题 I want to map 127.0.0.1 to multiple names instead of the standard way as localhost. so my /etc/hosts file in Ubuntu would have the following entries: 127.0.0.1 localhost 127.0.0.1 localhost:extra1 127.0.0.1 localhost:extra2 Now, in MySQL, I want to have a user named karthick and it should have different privileges. select user,host from users; The above statement shows karthick localhost:extra1; karthick localhost:extra2; My question: I am not able to login using mysql -u karthick -h

Security.salt value in controller

别说谁变了你拦得住时间么 提交于 2019-12-23 01:41:36
问题 In cakephp there is one file core.php It contains Configure::write('Security.salt', 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); How can i get the value of Security.salt in controller in cakephp. Thanks 回答1: Just try like this Configure::read('Security.salt'); it will give you the value. For more info check here 回答2: The above answers have not proven to be successful in CakePHP3. Configure::Read('Security.salt') will return a blank value. In-order to read the salt from the configuration file

Basic security, PHP mySQl

倖福魔咒の 提交于 2019-12-23 01:18:10
问题 So I am making a basic log-in page. I have a good idea of what to do, but I'm still unsure of some things. I have a database full of students and a password column of course. I know I'm going to use md5 encryption in that column. The student enters their e-mail and student ID, and they get e-mailed a password if correct. But, where do I create the password? Do I have to manually add the password (which is just a randomly generated string) in mySQL to all the students? And I am suppose to send

Encrypting chat & normal messages

不打扰是莪最后的温柔 提交于 2019-12-23 01:16:08
问题 After reading about encryption, I want to apply the technique to my app (nodes + react). I have a messenger which allows people to chat person to person and create groups. I believe that there should be 2 different techniques to do that Use private and public keys to encrypt messages person to person Create a shared "private key" for chat groups, which only joined people have access to I am a bit confused how 1 works, because if a message is encrypted using the public key, only the recipient

How to get security question answer in .net sql membership provider?

ぃ、小莉子 提交于 2019-12-23 01:13:51
问题 Is there any way to get form code level security question answer in .net SQL Membership Provider? I'm struggling with allowing user to have change password reset and change features using the same provider. Do anybody knows how to do that? Or if I would like to use question and answer feature it means that I automatically have to use security question to change password? 回答1: MembershipProviders such as SqlMemberShipProvider aren't designed to allow you to retrieve the password answer, only

WCF Client Certificate AND UserName Credentials forbidden

纵然是瞬间 提交于 2019-12-23 00:51:23
问题 I'm having issues getting a WCF client to connect to a server that requires a client certificate and also a username / password. I have verified that using JUST the client certificate works using this: var binding = new WSHttpBinding(SecurityMode.Transport); binding.Security.Transport = new HttpTransportSecurity(); binding.Security.Transport.ClientCredentialType = HttpClientCredentialType.Certificate; var ea = new EndpointAddress(EndpointUrl); using (var p = new ServiceReference1.AAAClient

ProfileProvider: retrieve list of all profiles

一个人想着一个人 提交于 2019-12-23 00:51:11
问题 I'm developing an asp.net intranet website with a ActiveDirectoryMembershipProvider and a SqlProfileProvider. One of the requirements of my website is to have a "Birthdays" page, which would require me to list all profiles and retrieving the birthday information from it. I approached the problem as follows: Invoke the Membership.GetAllUsers() static method; Iterate through the list of users and retrieve the profile from the member's user name This approach, however, failed for the following