Skip to content

Add ability to inject URLSession in WebAuthenticationUI flows to enable certificate pinning. #162

@SwiftNativeDeveloper

Description

@SwiftNativeDeveloper

Describe the feature request?

I would like the ability to secure and instrument all network calls being made in my application. Specifically, I'd like the ability to pass in a URLSession that I control, or at least the assigned configuration and delegate. This would allow me to perform certificate pinning on the connection if I choose to mitigate MITM attacks.

The authentication challenge delegate callback is the method that needs to be overridden.

Allowing injection of a URLSession also would enable metric collection via the task metrics delegate callback as an added perk.

This request is inspired by reading Insecure Communication on OWASP.

Seealso: OWASP Mobile Top 10 2023

It appears that this would just be adding another initialization parameter. It could be optional and nil by default here.

New or Affected Resource(s)

https://github.com/okta/okta-mobile-swift/blob/master/Sources/WebAuthenticationUI/WebAuthentication.swift#L305

Provide a documentation link

No response

Additional Information?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions