Bug 217401

Summary: [WebAuthn] Implement a dummy WebAuthenticationAgent Part 1
Product: WebKit Reporter: Jiewen Tan <jiewen_tan>
Component: WebKit Misc.Assignee: Jiewen Tan <jiewen_tan>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, bfulgham, darin, hector_i_lopez, jiewen_tan, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=217559
Bug Depends on:    
Bug Blocks: 181943    
Attachments:
Description Flags
Part 1
darin: review+
Part 1 for landing
none
Part 1 for landing none

Description Jiewen Tan 2020-10-06 12:40:46 PDT
Implement a dummy WebAuthenticationAgent.
Comment 1 Radar WebKit Bug Importer 2020-10-06 12:41:34 PDT
<rdar://problem/70012011>
Comment 2 Jiewen Tan 2020-10-06 13:05:52 PDT
Created attachment 410685 [details]
Part 1
Comment 3 Darin Adler 2020-10-07 09:01:46 PDT
Comment on attachment 410685 [details]
Part 1

View in context: https://bugs.webkit.org/attachment.cgi?id=410685&action=review

> Source/WebKit/ChangeLog:12
> +        from the UI Process such that we can isolated high privileged entitlements to this standalone daemon and therefore are able

isolate

> Source/WebKit/ChangeLog:13
> +        to offer WebAuthn to third party WKWebView clients. One of the future feautre will require this new process to listen to

“to offer” -> “offer”

“features”

> Source/WebKit/ChangeLog:14
> +        LaunchEvents, which only daemons can do. That's why it is implemented as a user agent instead of a xpc service.

XPC

> Source/WebKit/ChangeLog:16
> +        This is the first part to establish such a dummy daemon. What it does is to setup a new build target for the daemon and

“First part to establish” -> “first part of establishing” or “first step on the path of establishing”

“setup”-> “set up”

> Source/WebKit/ChangeLog:34
> +        Not sure why libWTF.a is needed. Will fix that in the later part.

My guess is that WTFLogAlways is the reason.

> Source/WebKit/Daemons/WebAuthenticationAgent/Info.plist:6
> +	<string>${BUNDLE_VERSION}, Copyright 2003-2020 Apple Inc.</string>

Not sure this needs a copyright going back to 2003

> Source/WebKit/Daemons/WebAuthenticationAgent/Info.plist:22
> +	<string>????</string>

Is this correct?

> Source/WebKit/Daemons/WebAuthenticationAgent/com.apple.webkit.WebAuthenticationAgent.plist:17
> +	<string>/Users/jwtan/Documents/Build/Products/Debug/com.apple.WebKit.WebAuthenticationAgent.Development</string>

Change log does mention this, but it’s not great!

> Source/WebKit/Daemons/WebAuthenticationAgent/main.mm:31
> +        // FIXME: Implement it.

Don’t need this. We won’t forget.
Comment 4 Jiewen Tan 2020-10-07 14:42:45 PDT
Comment on attachment 410685 [details]
Part 1

View in context: https://bugs.webkit.org/attachment.cgi?id=410685&action=review

Thanks Darin for r+ this patch.

>> Source/WebKit/ChangeLog:12
>> +        from the UI Process such that we can isolated high privileged entitlements to this standalone daemon and therefore are able
> 
> isolate

Fixed.

>> Source/WebKit/ChangeLog:13
>> +        to offer WebAuthn to third party WKWebView clients. One of the future feautre will require this new process to listen to
> 
> “to offer” -> “offer”
> 
> “features”

Fixed.

>> Source/WebKit/ChangeLog:14
>> +        LaunchEvents, which only daemons can do. That's why it is implemented as a user agent instead of a xpc service.
> 
> XPC

Fixed.

>> Source/WebKit/ChangeLog:16
>> +        This is the first part to establish such a dummy daemon. What it does is to setup a new build target for the daemon and
> 
> “First part to establish” -> “first part of establishing” or “first step on the path of establishing”
> 
> “setup”-> “set up”

Fixed.

>> Source/WebKit/ChangeLog:34
>> +        Not sure why libWTF.a is needed. Will fix that in the later part.
> 
> My guess is that WTFLogAlways is the reason.

Right. I tried to only link WebKit.framework like the GPU process does but it doesn't work. Anyway, I will figure that out.

>> Source/WebKit/Daemons/WebAuthenticationAgent/Info.plist:6
>> +	<string>${BUNDLE_VERSION}, Copyright 2003-2020 Apple Inc.</string>
> 
> Not sure this needs a copyright going back to 2003

I copied it from the GPU process which is just created... I'm not sure as well.

>> Source/WebKit/Daemons/WebAuthenticationAgent/Info.plist:22
>> +	<string>????</string>
> 
> Is this correct?

I copied it from the GPU process...

>> Source/WebKit/Daemons/WebAuthenticationAgent/com.apple.webkit.WebAuthenticationAgent.plist:17
>> +	<string>/Users/jwtan/Documents/Build/Products/Debug/com.apple.WebKit.WebAuthenticationAgent.Development</string>
> 
> Change log does mention this, but it’s not great!

Sure! Will fix that!

>> Source/WebKit/Daemons/WebAuthenticationAgent/main.mm:31
>> +        // FIXME: Implement it.
> 
> Don’t need this. We won’t forget.

Fixed.
Comment 5 Jiewen Tan 2020-10-07 14:59:33 PDT
Comment on attachment 410685 [details]
Part 1

View in context: https://bugs.webkit.org/attachment.cgi?id=410685&action=review

>>> Source/WebKit/Daemons/WebAuthenticationAgent/Info.plist:22
>>> +	<string>????</string>
>> 
>> Is this correct?
> 
> I copied it from the GPU process...

It's the default value: https://stackoverflow.com/questions/1875912/naming-convention-for-cfbundlesignature-and-cfbundleidentifier.
Comment 6 Jiewen Tan 2020-10-07 15:00:44 PDT
Created attachment 410788 [details]
Part 1 for landing
Comment 7 EWS 2020-10-07 15:28:02 PDT
Committed r268155: <https://trac.webkit.org/changeset/268155>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 410788 [details].
Comment 8 Jiewen Tan 2020-10-08 13:30:56 PDT
Reopened for Part 2.
Comment 9 Hector Lopez 2020-10-08 16:05:12 PDT
Reverted r268155 for reason:

This reverts r268155 becasue it broke internal builds

Committed r268217: <https://trac.webkit.org/changeset/268217>
Comment 10 Jiewen Tan 2020-10-08 21:24:15 PDT
(In reply to Hector Lopez from comment #9)
> Reverted r268155 for reason:
> 
> This reverts r268155 becasue it broke internal builds
> 
> Committed r268217: <https://trac.webkit.org/changeset/268217>

Foundation.framework is needed.
Comment 11 Jiewen Tan 2020-10-08 21:26:31 PDT
Created attachment 410909 [details]
Part 1 for landing
Comment 12 EWS 2020-10-08 22:16:07 PDT
Committed r268248: <https://trac.webkit.org/changeset/268248>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 410909 [details].
Comment 13 Jiewen Tan 2020-10-09 12:48:31 PDT
Reopened for Part 2.
Comment 14 Darin Adler 2020-10-09 19:37:51 PDT
(In reply to Jiewen Tan from comment #13)
> Reopened for Part 2.

That seems like a bad idea. Why use the same bug for two patches?
Comment 15 Jiewen Tan 2020-10-09 20:07:16 PDT
(In reply to Darin Adler from comment #14)
> (In reply to Jiewen Tan from comment #13)
> > Reopened for Part 2.
> 
> That seems like a bad idea. Why use the same bug for two patches?

Given they are all building the same dummy agent? Let me open up a new bug.