-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(e2ei)!: remove 'clientId' from activation & rotate enrollment no…
…w that we expect a specific ClientId format
- Loading branch information
Showing
6 changed files
with
12 additions
and
71 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1958,7 +1958,6 @@ export class CoreCrypto { | |
* Generates an E2EI enrollment instance for a "regular" client (with a Basic credential) willing to migrate to E2EI. | ||
* Once the enrollment is finished, use the instance in {@link CoreCrypto.e2eiRotateAll} to do the rotation. | ||
* | ||
* @param clientId - client identifier e.g. `b7ac11a4-8f01-4527-af88-1c30885a7931:[email protected]` | ||
* @param displayName - human-readable name displayed in the application e.g. `Smith, Alice M (QA)` | ||
* @param handle - user handle e.g. `[email protected]` | ||
* @param expiryDays - generated x509 certificate expiry | ||
|
@@ -1967,7 +1966,6 @@ export class CoreCrypto { | |
* @returns The new {@link E2eiEnrollment} enrollment instance to use with {@link CoreCrypto.e2eiRotateAll} | ||
*/ | ||
async e2eiNewActivationEnrollment( | ||
clientId: string, | ||
displayName: string, | ||
handle: string, | ||
expiryDays: number, | ||
|
@@ -1976,7 +1974,6 @@ export class CoreCrypto { | |
): Promise<E2eiEnrollment> { | ||
const e2ei = await CoreCryptoError.asyncMapErr( | ||
this.#cc.e2ei_new_activation_enrollment( | ||
clientId, | ||
displayName, | ||
handle, | ||
team, | ||
|
@@ -1993,7 +1990,6 @@ export class CoreCrypto { | |
* has been revoked. It lets you change the DisplayName or the handle | ||
* if you need to. Once the enrollment is finished, use the instance in {@link CoreCrypto.e2eiRotateAll} to do the rotation. | ||
* | ||
* @param clientId - client identifier e.g. `b7ac11a4-8f01-4527-af88-1c30885a7931:[email protected]` | ||
* @param expiryDays - generated x509 certificate expiry | ||
* @param ciphersuite - for generating signing key material | ||
* @param displayName - human-readable name displayed in the application e.g. `Smith, Alice M (QA)` | ||
|
@@ -2002,7 +1998,6 @@ export class CoreCrypto { | |
* @returns The new {@link E2eiEnrollment} enrollment instance to use with {@link CoreCrypto.e2eiRotateAll} | ||
*/ | ||
async e2eiNewRotateEnrollment( | ||
clientId: string, | ||
expiryDays: number, | ||
ciphersuite: Ciphersuite, | ||
displayName?: string, | ||
|
@@ -2011,7 +2006,6 @@ export class CoreCrypto { | |
): Promise<E2eiEnrollment> { | ||
const e2ei = await CoreCryptoError.asyncMapErr( | ||
this.#cc.e2ei_new_rotate_enrollment( | ||
clientId, | ||
displayName, | ||
handle, | ||
team, | ||
|
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 |
---|---|---|
|
@@ -81,7 +81,6 @@ class CoreCryptoCentral private constructor(private val cc: CoreCrypto, private | |
* Generates an E2EI enrollment instance for a "regular" client (with a Basic credential) willing to migrate to E2EI. | ||
* Once the enrollment is finished, use the instance in [e2eiRotateAll] to do the rotation. | ||
* | ||
* @param clientId client identifier e.g. `b7ac11a4-8f01-4527-af88-1c30885a7931:[email protected]` | ||
* @param displayName human-readable name displayed in the application e.g. `Smith, Alice M (QA)` | ||
* @param handle user handle e.g. `[email protected]` | ||
* @param expiryDays generated x509 certificate expiry | ||
|
@@ -90,7 +89,6 @@ class CoreCryptoCentral private constructor(private val cc: CoreCrypto, private | |
* @return The new [E2EIEnrollment] enrollment to use with [e2eiRotateAll] | ||
*/ | ||
suspend fun e2eiNewActivationEnrollment( | ||
clientId: String, | ||
displayName: String, | ||
handle: String, | ||
expiryDays: UInt, | ||
|
@@ -99,7 +97,6 @@ class CoreCryptoCentral private constructor(private val cc: CoreCrypto, private | |
): E2EIEnrollment { | ||
return E2EIEnrollment( | ||
cc.e2eiNewActivationEnrollment( | ||
clientId, | ||
displayName, | ||
handle, | ||
team, | ||
|
@@ -114,7 +111,6 @@ class CoreCryptoCentral private constructor(private val cc: CoreCrypto, private | |
* their credential, either because the former one is expired or it has been revoked. It lets you change the DisplayName | ||
* or the handle if you need to. Once the enrollment is finished, use the instance in [e2eiRotateAll] to do the rotation. | ||
* | ||
* @param clientId client identifier e.g. `b7ac11a4-8f01-4527-af88-1c30885a7931:[email protected]` | ||
* @param expiryDays generated x509 certificate expiry | ||
* @param ciphersuite for generating signing key material | ||
* @param displayName human-readable name displayed in the application e.g. `Smith, Alice M (QA)` | ||
|
@@ -123,7 +119,6 @@ class CoreCryptoCentral private constructor(private val cc: CoreCrypto, private | |
* @return The new [E2EIEnrollment] enrollment to use with [e2eiRotateAll] | ||
*/ | ||
suspend fun e2eiNewRotateEnrollment( | ||
clientId: String, | ||
expiryDays: UInt, | ||
ciphersuite: Ciphersuite, | ||
displayName: String? = null, | ||
|
@@ -132,7 +127,6 @@ class CoreCryptoCentral private constructor(private val cc: CoreCrypto, private | |
): E2EIEnrollment { | ||
return E2EIEnrollment( | ||
cc.e2eiNewRotateEnrollment( | ||
clientId, | ||
displayName, | ||
handle, | ||
team, | ||
|
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 |
---|---|---|
|
@@ -1162,31 +1162,29 @@ public class CoreCryptoWrapper { | |
/// Generates an E2EI enrollment instance for a "regular" client (with a Basic credential) willing to migrate to E2EI. | ||
/// Once the enrollment is finished, use the instance in ``CoreCrypto/e2eiRotateAll`` to do the rotation. | ||
/// | ||
/// - parameter clientId: client identifier e.g. `b7ac11a4-8f01-4527-af88-1c30885a7931:[email protected]` | ||
/// - parameter displayName: human readable name displayed in the application e.g. `Smith, Alice M (QA)` | ||
/// - parameter handle: user handle e.g. `[email protected]` | ||
/// - parameter expiryDays: generated x509 certificate expiry | ||
/// - parameter ciphersuite: For generating signing key material. | ||
/// - parameter team: name of the Wire team a user belongs to | ||
/// - returns: The new ``CoreCryptoSwift.WireE2eIdentity`` object | ||
public func e2eiNewActivationEnrollment(clientId: String, displayName: String, handle: String, expiryDays: UInt32, ciphersuite: UInt16, handle: String? = nil) async throws -> E2eiEnrollment { | ||
let enrollment = try await self.coreCrypto.e2eiNewActivationEnrollment(clientId: clientId, displayName: displayName, handle: handle, team: team, expiryDays: expiryDays, ciphersuite: ciphersuite) | ||
public func e2eiNewActivationEnrollment(displayName: String, handle: String, expiryDays: UInt32, ciphersuite: UInt16, handle: String? = nil) async throws -> E2eiEnrollment { | ||
let enrollment = try await self.coreCrypto.e2eiNewActivationEnrollment(displayName: displayName, handle: handle, team: team, expiryDays: expiryDays, ciphersuite: ciphersuite) | ||
return E2eiEnrollment(enrollment) | ||
} | ||
|
||
/// Generates an E2EI enrollment instance for a E2EI client (with a X509 certificate credential)having to change/rotate | ||
/// their credential, either because the former one is expired or it has been revoked. It lets you change | ||
/// the DisplayName or the handle if you need to. Once the enrollment is finished, use the instance in ``CoreCrypto/e2eiRotateAll`` to do the rotation. | ||
/// | ||
/// - parameter clientId: client identifier e.g. `b7ac11a4-8f01-4527-af88-1c30885a7931:[email protected]` | ||
/// - parameter expiryDays: generated x509 certificate expiry | ||
/// - parameter ciphersuite: For generating signing key material. | ||
/// - parameter displayName: human readable name displayed in the application e.g. `Smith, Alice M (QA)` | ||
/// - parameter handle: user handle e.g. `[email protected]` | ||
/// - parameter team: name of the Wire team a user belongs to | ||
/// - returns: The new ``CoreCryptoSwift.WireE2eIdentity`` object | ||
public func e2eiNewRotateEnrollment(clientId: String, expiryDays: UInt32, ciphersuite: UInt16, displayName: String? = nil, handle: String? = nil, team: String? = nil) async throws -> E2eiEnrollment { | ||
let enrollment = try await self.coreCrypto.e2eiNewRotateEnrollment(clientId: clientId, expiryDays: expiryDays, ciphersuite: ciphersuite, displayName: displayName, handle: handle, team: team) | ||
public func e2eiNewRotateEnrollment(expiryDays: UInt32, ciphersuite: UInt16, displayName: String? = nil, handle: String? = nil, team: String? = nil) async throws -> E2eiEnrollment { | ||
let enrollment = try await self.coreCrypto.e2eiNewRotateEnrollment(expiryDays: expiryDays, ciphersuite: ciphersuite, displayName: displayName, handle: handle, team: team) | ||
return E2eiEnrollment(enrollment) | ||
} | ||
|
||
|
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