trusted certificate entries are not password-protected Spring SAML

前端 未结 5 1412
无人及你
无人及你 2020-12-16 13:50

I have generated testIdp.cer file by copying 509 entry of the IDP I am planning to connect. Then I created JKS file by executing the following command

keytoo         


        
5条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-16 14:44

    For those looking for answers in java config please comment out the line passwords.put("mykeyalias", "mystorepass"); .... shown in code snippet below.

    @Bean
    public KeyManager keyManager() {
        DefaultResourceLoader loader = new DefaultResourceLoader();
        Resource storeFile = loader.getResource("classpath:saml-keystore.jks");
        Map passwords = new HashMap<>();
        // passwords.put("mykeyalias", "mystorepass");
        return new JKSKeyManager(storeFile, "mystorepass", passwords, "mykeyalias");
    }
    

提交回复
热议问题