-
Notifications
You must be signed in to change notification settings - Fork 827
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature: add persistence support for private_key_jwt
Allow to setup jwks_uri and jwks, similar to OIDC proxy mode with tokenKeyUrl and tokenKey. The private_key_jwt metadata is stored in additional_information (could be switched to own column) The setup can be done from REST and yaml.
- Loading branch information
Showing
10 changed files
with
445 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
93 changes: 93 additions & 0 deletions
93
model/src/main/java/org/cloudfoundry/identity/uaa/oauth/client/PrivateKeyChangeRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
/******************************************************************************* | ||
* Cloud Foundry | ||
* Copyright (c) [2009-2016] Pivotal Software, Inc. All Rights Reserved. | ||
* | ||
* This product is licensed to you under the Apache License, Version 2.0 (the "License"). | ||
* You may not use this product except in compliance with the License. | ||
* | ||
* This product includes a number of subcomponents with | ||
* separate copyright notices and license terms. Your use of these | ||
* subcomponents is subject to the terms and conditions of the | ||
* subcomponent's license, as noted in the LICENSE file. | ||
*******************************************************************************/ | ||
package org.cloudfoundry.identity.uaa.oauth.client; | ||
|
||
|
||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | ||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
import static org.cloudfoundry.identity.uaa.oauth.client.PrivateKeyChangeRequest.ChangeMode.ADD; | ||
|
||
/** | ||
*/ | ||
@JsonInclude(JsonInclude.Include.NON_NULL) | ||
@JsonIgnoreProperties(ignoreUnknown = true) | ||
public class PrivateKeyChangeRequest { | ||
|
||
public enum ChangeMode { | ||
UPDATE, | ||
ADD, | ||
DELETE | ||
} | ||
@JsonProperty("kid") | ||
private String keyId; | ||
@JsonProperty("jwks_uri") | ||
private String keyUrl; | ||
@JsonProperty("jwks") | ||
private String keyConfig; | ||
@JsonProperty("client_id") | ||
private String clientId; | ||
private ChangeMode changeMode = ADD; | ||
|
||
public PrivateKeyChangeRequest() { | ||
} | ||
|
||
public PrivateKeyChangeRequest(String clientId, String keyUrl, String keyConfig) { | ||
this.keyUrl = keyUrl; | ||
this.keyConfig = keyConfig; | ||
this.clientId = clientId; | ||
} | ||
|
||
public String getKeyUrl() { | ||
return keyUrl; | ||
} | ||
|
||
public void setKeyUrl(String keyUrl) { | ||
this.keyUrl = keyUrl; | ||
} | ||
|
||
public String getKeyConfig() { | ||
return keyConfig; | ||
} | ||
|
||
public void setKeyConfig(String keyConfig) { | ||
this.keyConfig = keyConfig; | ||
} | ||
|
||
public String getClientId() { | ||
return clientId; | ||
} | ||
|
||
public void setClientId(String clientId) { | ||
this.clientId = clientId; | ||
} | ||
|
||
public ChangeMode getChangeMode() { | ||
return changeMode; | ||
} | ||
|
||
public void setChangeMode(ChangeMode changeMode) { | ||
this.changeMode = changeMode; | ||
} | ||
|
||
public String getKeyId() { return keyId;} | ||
|
||
public void setKeyId(String keyId) { | ||
this.keyId = keyId; | ||
} | ||
|
||
public String getKey() { | ||
return keyUrl != null ? keyUrl : keyConfig; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.