Questions tagged [java-security]

Java security technology is set of libraries, tools, and implementations of commonly used security algorithms, mechanisms, and protocols including cryptography, public key infrastructure, secure communication, authentication, and access control

Java security technology is set of libraries, tools, and implementations of commonly used security algorithms, mechanisms, and protocols. The Java security APIs includes cryptography, public key infrastructure, secure communication, authentication, and access control. Java security technology provides the developer with a comprehensive security framework for writing applications, and also provides the user or administrator with a set of tools to securely manage applications.

Underlying the Java SE Platform is a dynamic, extensible security architecture, standards-based and interoperable. Security features — cryptography, authentication and authorization, public key infrastructure, and more — are built in. The Java security model is based on a customizable "sandbox" in which Java software programs can run safely, without potential risk to systems or users.

399 questions
0
votes
0 answers

Encrypt and Decrypt small file on android client side (java)

I generate a small metadata file (2KB) from my app which needs to be unreadable if the user browse through file system. These files will not be transferred elsewhere through my app. After prolong research I figured I have to use Symmetry…
pats
  • 1,273
  • 2
  • 20
  • 43
0
votes
2 answers

AccessControlException in doPriveledge

We are trying to get the number of files from a directory using the below code: File dataDir = new File(dataHome); final File privdataDir = dataDir; System.out.println("The datadir is : \n"+dataDir+"The privdataDir is :…
0
votes
1 answer

Certifying Pdf document with iText

I can sign my pdf and verify it by adding my smith.crt to be trusted in adobe reader (i get the green check mark) , my problem is certifying my pdf, i can not get the blue ribbon in the top left corner of my pdf, is it because i use the self-signed…
caniaskyouaquestion
  • 657
  • 2
  • 11
  • 21
-1
votes
1 answer

I have RSA encrypted private key with passphrase how do I decrypt the private key file

Basically I want to do this in command in java openssl rsa -in enc_private.key -out private.key -passin pass:passphrase_xyz beginning of my encrypted key file looks like this -----BEGIN RSA PRIVATE KEY----- Proc-Type: 4,ENCRYPTED DEK-Info:…
Manth
  • 358
  • 3
  • 4
  • 14
-1
votes
1 answer

Problem verifying signature using public key

I have a webhook that sends a header, which needs to be verified. Below are some details: Problem : The Java method always returns false. The provided header and body are correct and should result as TRUE. As per docs from the provider : Signature =…
-1
votes
1 answer

What is the purpose of Java key store parameter (javax.net.ssl.keyStore), How to use it?

In order to documentations and samples to use key store in JAVA, we need to specify keystore file and password like below; KeyStore keyStore = KeyStore.getInstance("PKCS12"); keyStore.load(new FileInputStream("/path/cert.p12"),…
Sam
  • 105
  • 2
  • 9
-1
votes
1 answer

File encryption and decryption does not work in java

I want to encrypt a large video file called largefile.mp4 most efficiently and then decrypt it again, but there it is not working as expected. actually there is not any error, and the files gets generated. but the new generated file is too small…
Muhammad
  • 2,572
  • 4
  • 24
  • 46
-1
votes
1 answer

How can I redirect to the original request url with Java EE Security @CustomFormAuthenticationMechanismDefinition

When I use @FormAuthenticationMechanismDefinition( loginToContinue = @LoginToContinue( loginPage = "/login.xhtml", useForwardToLogin = false)) then, after a successful login, the user gets redirected to the…
Jimmy Praet
  • 2,230
  • 1
  • 15
  • 14
-1
votes
1 answer

Set up end to end Kerberos Authentication in Gemfire(Apache Geode)

I want to secure a gemfire(v9.9) cluster with kerberos authentication. I believe i have to, authenticate the client and gemfire server to KDC( active directory in my case), using JAAS and a keytab at the client get the session ticket( a byte [])…
Saurabh
  • 95
  • 2
  • 8
-1
votes
1 answer

I am using @PreAuthorize("hasAnyRole('SOME_ROLE')"), how to test it using testNG?

I have started to use @PreAuthorize, which i want to test using testNg. I am using withUserContext("username"); But every test I run gets passed but in real time the authorisation is done perfectly in the portal. Can someone help me out of…
shashank
  • 11
  • 7
-1
votes
1 answer

what is the use of "https://expired.badssl.com" ? Can someone explain it to me

I am using it in my code as follow. but can't understand what is the use of it. URL url = new URL("https://expired.badssl.com/");//https://revoked.grc.com/ HttpsURLConnection urlConnection =…
C.k.
  • 93
  • 2
  • 13
-1
votes
1 answer

How to Calculate Fingerprint From SSH DSA Public Key in Java?

Similar to question How to Calculate Fingerprint From SSH RSA Public Key in Java? , I would like to know how to Calculate Fingerprint for a DSA Public Key. I've got the dsaPublicKey object. DSAPublicKey dsaPublicKey = (DSAPublicKey) publicKey;
linc01n
  • 418
  • 2
  • 6
  • 17
-1
votes
1 answer

org.bitcoinj.core.AddressFormatException: Illegal character 0 at position 0 when converting 66 characters long private key to ECKey

I have a bitcoin private key which is 66 characters long, including a 0x prefix and I need to convert it to a ECKey. I tried this: String private = "0x..."; // 66 characters total DumpedPrivateKey dpk = DumpedPrivateKey.fromBase58(null, wif); ECKey…
Eddy
  • 3,533
  • 13
  • 59
  • 89
-1
votes
3 answers

How can I secure (encrypt with Java code) the values of login form that will redirect to servlet

I have a security concern about sending secure data (encrypted before sending request) to servlet. I tried to call the function that make encryption for password as example but I can't pass value from Java script to Java code in JSP.