security

Spring @PreAuthorize hasAuthority Exception Failed to convert from type [java.lang.String] to type [java.lang.Boolean] for value 'hasAuthority

泪湿孤枕 提交于 2021-01-29 09:50:36
问题 So I created a class with two simple public strings public final class Right { private Right() { super(); } public static final String AUTH = "hasAuthority('admin') or hasAuthority('mod')"; } When I used it together with the @PreAuthorize annotation at my controllers it works like a charm. I do not like that it is hardcoded. For this reason I've put the roles in the properties and I tried to use it as a component: @Component("authRule") public class AuthRule { @Value("${role.administrator}")

Strange architecture to secure the RESTfull services (spring boot): authentication (on firebase) + JWT authorisation (on REST server)

ε祈祈猫儿з 提交于 2021-01-29 09:14:51
问题 I have a special request from our client that I'll describe below and I'm trying to find out the best fit for this kind of "strange" architecture. So, it's about a mobile app (nativescript-angular) using firebase to authenticate their users. The authentication is done both oauth2 (facebook, google, apple) and usual login (username/password). The problem here is that all the other application resources (list of cards, create card, list of providers, etc.) are provided by a set of RESTfull end

Monitoring or disabling WinAPI functions

僤鯓⒐⒋嵵緔 提交于 2021-01-29 08:19:25
问题 As a proof of concept, I wrote a quick keylogger in .NET. It was only 150 lines and it worked flawlessly. It's frighteningly effective. With some relatively simple use of the WinAPI function GetAsyncKeyState , I was able to capture any and all keystrokes and save them to a data file. My question is, is it possible for one program to detect when another program calls GetAsyncKeyState ? Furthermore, is it possible to detect when another program calls any winAPI function at all? Thanks! 回答1: Yes

Replace builtin Date without being able to recover original constructor

做~自己de王妃 提交于 2021-01-29 08:08:17
问题 I want to replace Date inside a JavaScript VM (V8 but this is not specific to V8), and make it impossible to access the original Date constructor. This is meant to be one part of a defence against timing attacks like Spectre with multi-tenant JavaScript running in the same process (but different JavaScript VM.) The idea is to deny access to high resolution timers. Cloudflare does this in their Workers, for the same reason. Time is advanced only when IO happens, not during computation. I know

Blackduck scan showing FILE MODIFIED with older version of Jetty Http

与世无争的帅哥 提交于 2021-01-29 06:49:32
问题 We have one module which we are building in maven as executable jar file using commad line using spring-boot-maven-plugin with version 2.1.0.RELEASE by passing goal as repackage, classifire as one-jar and have configured mainClass also. In my pom.xml file code is shown as below: <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <version>2.1.0.RELEASE</version> <executions> <execution> <goals> <goal>repackage</goal> </goals> <configuration>

How to ensure that keys are created inside TPM?

徘徊边缘 提交于 2021-01-29 05:14:52
问题 I need to run .exe on client machine, which will create key pair within TPM. And then I will create CSR with public key part of key pair generated by TPM. My concerns are how do i ensure that keys are created inside TPM , and not by spoofed TPM. Which would enable private key to be migrated and copied. I heard that is what AIKs are for , but i don't understand how can this prevent TPM for being spoofed? One solution that i can think of is : I go to client, boot from USB with trusted OS, and

Is this python pip install script legitmate or a trojan horse?

大城市里の小女人 提交于 2021-01-29 04:11:47
问题 I am following this tutorial here to install python: http://docs.python-guide.org/en/latest/starting/install/win/ When it gets to the part about installing setup tools and pip it links to a ez_setup.py script which I downloaded and ran. It seemed to install setup_tools. I then clicked on the link to the pip-get.py and noticed it only contained the following: #!/usr/bin/env python import sys def main(): sys.exit( "You're using an outdated location for the get-pip.py script, please " "use the

How to configure Windows authentication for custom binding in WCF service?

帅比萌擦擦* 提交于 2021-01-29 04:06:24
问题 I need to use Windows authentication in my application along with claim-based authorization using Windows Identity Foundation. I have used following configuration for my service. <system.identityModel> <identityConfiguration> <claimsAuthorizationManager type="Framework.Authorization.AuthorizationManager, ClaimsAuthorizationService"/> </identityConfiguration> </system.identityModel> <system.serviceModel> <bindings> <customBinding> <binding name="CustomTcpBinding" maxConnections="50"

Owin selfhost: using netsh to add an urlAcl seems to cause 503

本小妞迷上赌 提交于 2021-01-29 03:08:09
问题 I have a owin selfhost of a simple WebApi running as a windows service. After creating/installing certificates to aproach this WebApi through https, I got the certificate working but stayed stuck with a return code of 503. It seemed not a certificate problem, the browser does not complain anymore and shows a closed lock as intended. I changed the service account during the certificate installation, so to test if that was the problem I changed the listening address back to http. It worked fine

Force Rundeck “Secure Remote Authentication” option to pass to script

生来就可爱ヽ(ⅴ<●) 提交于 2021-01-29 01:34:57
问题 SSH key authentication is frowned upon in my environment (a point I disagree with) so Rundeck users are forced into entering their SSH password at run time into a "Secure Remote Authentication" option. Short of setting up two separate options, one "Secure" to pass to the scripts and the other "Secure Remote Authentication" for authenticating the SSH sessions, is there any way to force the contents of a "Secure Remote Authentication" job option to also be passed to a script that the job is