What happens if one certificate path is valid while the other one is not?

I have recently figured out that Lets Encrypt provides "invalid" certificate chain in it’s certificates that are pointing to the root certificate that has expired a month ago (they did it apparently to support old android devices… Continue reading What happens if one certificate path is valid while the other one is not?

Is mime-sniffing still something to protect against with modern browsers (with X-Content-Type-Options)?

I have read about X-Content-Type-Options and it says often that it protects against IE mime sniffing problems.
I am wondering if in 2021 it is still valid and a problem for modern browsers? In other words, will it be beneficial for my web … Continue reading Is mime-sniffing still something to protect against with modern browsers (with X-Content-Type-Options)?

Should I hide the difference between Not Found error and Access Denied error in my API?

I have a system that has different entities stored in the database with an integer Id as a primary key. There are different scenarios for queries that cannot be processed:

Get entity by id [Entity does not exist in the database]
Get entit… Continue reading Should I hide the difference between Not Found error and Access Denied error in my API?

What is the correct terminology for a private key corresponding to a public key certificate?

I have learned that the certificate is something that contain information about a public key. An article on wikipedia says Public Key Certificate as well. If we are talking about private key, it’s not a certificate, but a key that correspo… Continue reading What is the correct terminology for a private key corresponding to a public key certificate?

Is it safe to add "Access-Control-Allow-Origin:*" to an API endpoint with custom authentication via header?

Lets say I have a site at myapp.com that talks to the api at myapi.com. For that to work I have to turn on CORS. I want to do it like that:
Access-Control-Allow-Origin: *
and my API authentication is performed via a custom Authorize header… Continue reading Is it safe to add "Access-Control-Allow-Origin:*" to an API endpoint with custom authentication via header?

Does Asp.Net Core exposes too much information for required enums that were not supplied?

I have a simple code for an input model:

public class MyClass
{
[Required]
public MyEnum? Type { get; set; }
}

Now if I do not send Type as a part of json to the request, I get this error from Web.Api:

“The JSON value coul… Continue reading Does Asp.Net Core exposes too much information for required enums that were not supplied?

Is it a security issue that underlying infrastructure (like e.g. Kubernetes cluster) can easily be revealed?

I have recently found out that a very common setup of Kubernetes for some use cases of access over TLS returns an invalid certificate with name Kubernetes Ingress Controller Fake Certificate. I.e. making it obvious to anyone … Continue reading Is it a security issue that underlying infrastructure (like e.g. Kubernetes cluster) can easily be revealed?