Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix contract on Key Vault broken with premature merge #17741 #18340

Merged
merged 1 commit into from
Dec 30, 2020
Merged

Fix contract on Key Vault broken with premature merge #17741 #18340

merged 1 commit into from
Dec 30, 2020

Conversation

edburns
Copy link
Member

@edburns edburns commented Dec 24, 2020

On branch edburns-msft-18273-keyvault-certificates-properties WIP on #18273 property name consistency

This commit addresses the damage apparently done by the apparently prematurely merged #17741. That PR was seeking conceptual review in the associated issue #17740 (see this comment). While I received the conceptual review, I had not yet completed the corresponding implementation work.

This commit does not complete that work either. However, it does make
the system work again, but only with property names that strictly
conform to the "hyphens not camel case" syntax.

Before this commit, the system did not work at all.

After this commit, the system works, but only with the new conforming
properties, which means it will break existing customers.

I am continuing to work on #18273, which will make the system work
without breaking existing customers.

modified: sdk/keyvault/azure-security-keyvault-jca/README.md
modified: sdk/keyvault/azure-security-keyvault-jca/pom.xml

  • Several tests were using non-conforming test property names, such as:

    • System.getProperty("azure.tenant.id"),
    • System.getProperty("azure.client.id"),
    • System.getProperty("azure.client.secret"));

    I changed these to

    • System.getProperty("azure.keyvault.tenant-id"),
    • System.getProperty("azure.keyvault.client-id"),
    • System.getProperty("azure.keyvault.client-secret"));

modified: sdk/keyvault/azure-security-keyvault-jca/src/main/java/com/azure/security/keyvault/jca/KeyVaultKeyStore.java

modified: sdk/keyvault/azure-security-keyvault-jca/src/samples/java/sample/com/azure/security/keyvault/jca/ClientSSLSample.java
modified: sdk/keyvault/azure-security-keyvault-jca/src/samples/java/sample/com/azure/security/keyvault/jca/ServerSSLSample.java
modified: sdk/keyvault/azure-security-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/AuthClientTest.java
modified: sdk/keyvault/azure-security-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/KeyVaultJcaProviderTest.java
modified: sdk/keyvault/azure-security-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/KeyVaultKeyStoreTest.java
modified: sdk/keyvault/azure-security-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/KeyVaultLoadStoreParameterTest.java
modified: sdk/keyvault/azure-security-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/ServerSocketTest.java
modified: sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-keyvault-certificates/pom.xml
modified: sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-keyvault-certificates/src/main/resources/application.properties

  • These changes all bring the samples and tests into sync with the new contract.

@edburns edburns requested review from chenrujun and mnriem December 24, 2020 00:52
@ghost ghost added KeyVault azure-spring All azure-spring related issues labels Dec 24, 2020
@edburns edburns marked this pull request as draft December 24, 2020 00:52
…18273 property name consistency

This commit addresses the damage apparently done by the apparently prematurely merged #17741.  That PR was seeking conceptual review in the associated issue #17740 (see [this comment](#17740 (comment))).  While I received the conceptual review, I had not yet completed the corresponding implementation work.

This commit does not complete that work either.  However, it does make
the system work again, but only with property names that strictly
conform to the "hyphens not camel case" syntax.

Before this commit, the system did not work at all.

After this commit, the system works, but only with the new conforming
properties, which means it will break existing customers.

I am continuing to work on #18273, which will make the system work
without breaking existing customers.

modified:   sdk/keyvault/azure-security-keyvault-jca/README.md
modified:   sdk/keyvault/azure-security-keyvault-jca/pom.xml

- Several tests were using non-conforming test property names, such as:

   -    System.getProperty("azure.tenant.id"),
   -    System.getProperty("azure.client.id"),
   -    System.getProperty("azure.client.secret"));

   I changed these to

   +    System.getProperty("azure.keyvault.tenant-id"),
   +    System.getProperty("azure.keyvault.client-id"),
   +    System.getProperty("azure.keyvault.client-secret"));

modified:   sdk/keyvault/azure-security-keyvault-jca/src/main/java/com/azure/security/keyvault/jca/KeyVaultKeyStore.java

- This is where the damage happened.  When #17741 was merged, those
  changes invalidated the contract with this code.  This change
  modifies this side of the contract to conform with that in the
  existing #17741 change.

modified:   sdk/keyvault/azure-security-keyvault-jca/src/samples/java/sample/com/azure/security/keyvault/jca/ClientSSLSample.java
modified:   sdk/keyvault/azure-security-keyvault-jca/src/samples/java/sample/com/azure/security/keyvault/jca/ServerSSLSample.java
modified:   sdk/keyvault/azure-security-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/AuthClientTest.java
modified:   sdk/keyvault/azure-security-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/KeyVaultJcaProviderTest.java
modified:   sdk/keyvault/azure-security-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/KeyVaultKeyStoreTest.java
modified:   sdk/keyvault/azure-security-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/KeyVaultLoadStoreParameterTest.java
modified:   sdk/keyvault/azure-security-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/ServerSocketTest.java
modified:   sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-keyvault-certificates/pom.xml
modified:   sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-keyvault-certificates/src/main/resources/application.properties

- These changes all bring the samples and tests into sync with the new contract.
@edburns edburns marked this pull request as ready for review December 29, 2020 22:31
Copy link

@chenrujun chenrujun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@saragluna saragluna merged commit accc2ad into Azure:master Dec 30, 2020
@edburns edburns deleted the edburns-msft-18273-keyvault-certificates-properties branch December 30, 2020 19:37
@chenrujun chenrujun changed the title WIP: Fix contract on Key Vault broken with premature merge #17741 Fix contract on Key Vault broken with premature merge #17741 Dec 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
azure-spring All azure-spring related issues KeyVault
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants