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

Pop implementation for Confidential Client #1986

Merged
merged 14 commits into from
Aug 25, 2020
Merged

Pop implementation for Confidential Client #1986

merged 14 commits into from
Aug 25, 2020

Conversation

trwalke
Copy link
Member

@trwalke trwalke commented Aug 13, 2020

PR for #1946

@trwalke trwalke changed the title Pop cca Pop implementation for Confidential Client Aug 13, 2020
@henrik-me
Copy link
Contributor

did you consider refactoring for re-use across net desktop and net core?

@trwalke
Copy link
Member Author

trwalke commented Aug 13, 2020

did you consider refactoring for re-use across net desktop and net core?

@henrik-me yes. Netcore is implemented here. one more commit to push

@trwalke trwalke requested a review from henrik-me August 13, 2020 01:05
@henrik-me
Copy link
Contributor

I still see potential for refactoring's as there is code duplication which can be avoided.


In reply to: 673187877 [](ancestors = 673187877)

Copy link
Member

@bgavrilMS bgavrilMS left a comment

Choose a reason for hiding this comment

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

See comments

Copy link
Member

@bgavrilMS bgavrilMS left a comment

Choose a reason for hiding this comment

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

A few comments remaining

Copy link
Member

@bgavrilMS bgavrilMS left a comment

Choose a reason for hiding this comment

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

minor comments remaining, please resolve and commit

/// <summary>
/// The default implementation will store a key in memory
/// </summary>
internal class InMemoryCryptoProvider : IPoPCryptoProvider
Copy link
Member

Choose a reason for hiding this comment

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

@trwalke - as discussed, here's a suggestion on how to deal with the key expiration, since the crypto provider must always provide details about the same public / private key pair.

I moved your expiration logic to another class.

internal /* internal for test only */ const int RsaKeySize = 2048;


#if NET45
Copy link
Member

Choose a reason for hiding this comment

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

we now target both .net45 and .net 461, and in .net 461 the RSA.Create() works fine.

/// <summary>
/// This factory ensures key rotation every 8h
/// </summary>
internal class PoPProviderFactory
Copy link
Member

Choose a reason for hiding this comment

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

I moved expiration logic here.

@trwalke trwalke merged commit 4010442 into master Aug 25, 2020
@trwalke trwalke deleted the PopCCA branch August 25, 2020 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants