Next Server Security API Group Meeting

Hi all,

The next Security Group meeting will be Monday March 6th, (1-2pm CST) /
(11-12am PST) / (7-8pm GMT)

The agenda would be to go over the draft group pitch (
https://github.com/swift-server/security/blob/master/README.md\) and discuss
the project design goals and overall approach.

Webex:

password: swiftify

Regards,
Gelareh

Hi,

a major thing the proposal is missing is a strong requirement for non blocking I/O (for the server side effort). That should be builtin from the start.

This seems possible with OpenSSL, but AFAIK not with CommonCrypto. Which I don’t think is a big deal, because NIO could probably be emulated using threads on macOS. The latter is a dev platform anyways and it should be fine if it doesn’t scale that well ...

Summary: Please structure the API so that it works with NIO from the start. Designing something which requires a thread for each SSL connection is hopefully a no-go :->

Thanks,
  Helge

···

On 29 Jan 2017, at 14:52, Gelareh Taban via swift-server-dev <swift-server-dev@swift.org> wrote:

Hi all,

The next Security Group meeting will be Monday March 6th, (1-2pm CST) / (11-12am PST) / (7-8pm GMT)

The agenda would be to go over the draft group pitch (https://github.com/swift-server/security/blob/master/README.md\) and discuss the project design goals and overall approach.

Webex:
https://ibm2.webex.com/ibm2-en/j.php?MTID=m00fe55b2e62661e8568dd3728c8f8835
password: swiftify

Regards,
Gelareh

_______________________________________________
swift-server-dev mailing list
swift-server-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-server-dev

Correction to below date - Monday Feb 6th (1-2pm CST) / (11-12am PST) /
(7-8pm GMT)

Not March!

Regards,
Gelareh

···

From: Gelareh Taban via swift-server-dev <swift-server-dev@swift.org>
To: swift-server-dev@swift.org
Date: 01/29/2017 07:53 AM
Subject: [swift-server-dev] Next Server Security API Group Meeting
Sent by: swift-server-dev-bounces@swift.org

Hi all,

The next Security Group meeting will be Monday March 6th, (1-2pm CST) /
(11-12am PST) / (7-8pm GMT)

The agenda would be to go over the draft group pitch (
https://github.com/swift-server/security/blob/master/README.md\) and discuss
the project design goals and overall approach.

Webex:

password: swiftify

Regards,
Gelareh
_______________________________________________
swift-server-dev mailing list
swift-server-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-server-dev

is this WebEx link correct? It asks me to enter a meeting number :thinking:

···

On 29 Jan 2017, at 13:52, Gelareh Taban via swift-server-dev <swift-server-dev@swift.org> wrote:

Hi all,

The next Security Group meeting will be Monday March 6th, (1-2pm CST) / (11-12am PST) / (7-8pm GMT)

The agenda would be to go over the draft group pitch (https://github.com/swift-server/security/blob/master/README.md\) and discuss the project design goals and overall approach.

Webex:
https://ibm2.webex.com/ibm2-en/j.php?MTID=m00fe55b2e62661e8568dd3728c8f8835
password: swiftify

Regards,
Gelareh

_______________________________________________
swift-server-dev mailing list
swift-server-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-server-dev

Hi,

a major thing the proposal is missing is a strong requirement for non blocking I/O (for the server side effort). That should be builtin from the start.

This seems possible with OpenSSL, but AFAIK not with CommonCrypto. Which I don’t think is a big deal, because NIO could probably be emulated using threads on macOS. The latter is a dev platform anyways and it should be fine if it doesn’t scale that well …

What do you mean by « NIO is not possible with CommonCrypto ». CommonCryto has no IO API AFAIK. This is just a low level cryptographic library that provide a couple of digest and encryption algorithms. On macOS, the recommended low-level way to do SSL is using the SecurityFramework. And here again, the API is not responsible of the IO handling. So there is not constraint about what you use for IO.

···

Le 29 janv. 2017 à 15:33, Helge Heß via swift-server-dev <swift-server-dev@swift.org> a écrit :

Summary: Please structure the API so that it works with NIO from the start. Designing something which requires a thread for each SSL connection is hopefully a no-go :->

Thanks,
Helge

On 29 Jan 2017, at 14:52, Gelareh Taban via swift-server-dev <swift-server-dev@swift.org> wrote:

Hi all,

The next Security Group meeting will be Monday March 6th, (1-2pm CST) / (11-12am PST) / (7-8pm GMT)

The agenda would be to go over the draft group pitch (https://github.com/swift-server/security/blob/master/README.md\) and discuss the project design goals and overall approach.

Webex:
https://ibm2.webex.com/ibm2-en/j.php?MTID=m00fe55b2e62661e8568dd3728c8f8835
password: swiftify

Regards,
Gelareh

_______________________________________________
swift-server-dev mailing list
swift-server-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-server-dev

_______________________________________________
swift-server-dev mailing list
swift-server-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-server-dev

+ 1!

···

On 6 Feb 2017, at 14:00, Johannes Weiß via swift-server-dev <swift-server-dev@swift.org> wrote:

is this WebEx link correct? It asks me to enter a meeting number :thinking:

On 29 Jan 2017, at 13:52, Gelareh Taban via swift-server-dev <swift-server-dev@swift.org> wrote:

Hi all,

The next Security Group meeting will be Monday March 6th, (1-2pm CST) / (11-12am PST) / (7-8pm GMT)

The agenda would be to go over the draft group pitch (https://github.com/swift-server/security/blob/master/README.md\) and discuss the project design goals and overall approach.

Webex:
https://ibm2.webex.com/ibm2-en/j.php?MTID=m00fe55b2e62661e8568dd3728c8f8835
password: swiftify

Regards,
Gelareh

_______________________________________________
swift-server-dev mailing list
swift-server-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-server-dev

_______________________________________________
swift-server-dev mailing list
swift-server-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-server-dev

You’re a month early :)

Luke

···

On Feb 6, 2017, at 11:00 AM, Johannes Weiß via swift-server-dev <swift-server-dev@swift.org> wrote:

is this WebEx link correct? It asks me to enter a meeting number :thinking:

On 29 Jan 2017, at 13:52, Gelareh Taban via swift-server-dev <swift-server-dev@swift.org> wrote:

Hi all,

The next Security Group meeting will be Monday March 6th, (1-2pm CST) / (11-12am PST) / (7-8pm GMT)

The agenda would be to go over the draft group pitch (https://github.com/swift-server/security/blob/master/README.md\) and discuss the project design goals and overall approach.

Webex:
https://ibm2.webex.com/ibm2-en/j.php?MTID=m00fe55b2e62661e8568dd3728c8f8835
password: swiftify

Regards,
Gelareh

_______________________________________________
swift-server-dev mailing list
swift-server-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-server-dev

_______________________________________________
swift-server-dev mailing list
swift-server-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-server-dev

Hi,

Hi,

a major thing the proposal is missing is a strong requirement for non blocking I/O (for the server side effort). That should be builtin from the start.

This seems possible with OpenSSL, but AFAIK not with CommonCrypto. Which I don’t think is a big deal, because NIO could probably be emulated using threads on macOS. The latter is a dev platform anyways and it should be fine if it doesn’t scale that well …

What do you mean by « NIO is not possible with CommonCrypto ». CommonCryto has no IO API AFAIK. This is just a low level cryptographic library that provide a couple of digest and encryption algorithms. On macOS, the recommended low-level way to do SSL is using the SecurityFramework.

Obviously that's what I meant, sorry for not being precise ;->

And here again, the API is not responsible of the IO handling. So there is not constraint about what you use for IO.

I’m not entirely sure what you mean by that. Obviously a TLS library is absolutely responsible for Input/Output - in fact that is its whole purpose :-) Reading and writing data as well as connecting and accepting sockets (doing the TLS handshakes).
(Yes, I know, you refer to the ‘raw’ I/O to the kernel, but that is not necessarily the Posix API, it could also be libuv or libdispatch being hooked up)

AFAIK all libraries have the facility to stack another I/O library below them by the means of providing lower level read/write/connect/accept C function callbacks. (OpenSSL in a very flexible way using their BIOs).

However, I thought - and I may be very wrong here, which would be excellent - that SecurityFramework only supported blocking read and write callbacks and cannot be ‘paused’ until new data arrives.

Let me illustrate what I mean. Lets say we are doing the TLS handshake after accepting a socket. This involves the TLS library reading data from the TLS client. The TLS library may want to read a 4K block of data. So the usual blocking API goes like that (pseudo code):

  let rc = do_tls_handshake(tls_socket)
    Internal read 4K
      1) Calls read() -> returns say 512 bytes
      2) Calls read() -> returns say 123 bytes
      ..
      n) Calls read() -> returns say 321 bytes
    Validate, return, done

Now the ‘requirement’ for a server TLS library used on a production system (IMHO) is that a do_tls_handshake function (and any other I/O it triggers) can deal with any read() returning EWOULDBLOCK. It would need to record where it was and be able to resume doing the handshake when more data comes in.

There are many models on how the API for the NIO would look like (in Node/Noze it would just record the closures), but the basic flow is something like this:

  let rc = do_tls_handshake(tls_socket)
    Internal read 4K
      1) Calls read() -> returns say 512 bytes
      2) Calls read() -> returns EWOULDBLOCK
         do_tls_handshake returns EWOULDBLOCK

  if rc == EWOULDBLOCK {
    Wait-for-data-on-socket (kqueue …).onData {
      let rc = do_tls_handshake(tls_socket) // continue handshake
        Internal read 4K
          2) Calls read() -> returns 123
          3) Calls read() -> returns 321
          4) Calls read() -> returns EWOULDBLOCK
          do_tls_handshake returns EWOULDBLOCK
    }
  }

If SecurityFramework can deal with that, all is cool :-)

Regardless the API to the Swift TLS library should be so, that its I/O operations can run in a non-blocking fashion. Just imagine you want to write something like nginx in Swift.

Thanks,
  Helge

···

On 30 Jan 2017, at 08:45, Jean-Daniel via swift-server-dev <swift-server-dev@swift.org> wrote:

Le 29 janv. 2017 à 15:33, Helge Heß via swift-server-dev <swift-server-dev@swift.org> a écrit :

Actually, Luke, the meeting should be starting now.

Joannis Orlandos
joannis@orlandos.nl

···

On 6 Feb 2017, at 20:02, Luke² Hiesterman via swift-server-dev <swift-server-dev@swift.org> wrote:

You’re a month early :)

Luke

On Feb 6, 2017, at 11:00 AM, Johannes Weiß via swift-server-dev <swift-server-dev@swift.org> wrote:

is this WebEx link correct? It asks me to enter a meeting number :thinking:

On 29 Jan 2017, at 13:52, Gelareh Taban via swift-server-dev <swift-server-dev@swift.org> wrote:

Hi all,

The next Security Group meeting will be Monday March 6th, (1-2pm CST) / (11-12am PST) / (7-8pm GMT)

The agenda would be to go over the draft group pitch (https://github.com/swift-server/security/blob/master/README.md\) and discuss the project design goals and overall approach.

Webex:
https://ibm2.webex.com/ibm2-en/j.php?MTID=m00fe55b2e62661e8568dd3728c8f8835
password: swiftify

Regards,
Gelareh

_______________________________________________
swift-server-dev mailing list
swift-server-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-server-dev

_______________________________________________
swift-server-dev mailing list
swift-server-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-server-dev

_______________________________________________
swift-server-dev mailing list
swift-server-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-server-dev

I’m just told off-list that this is not true. The lowest-level TLS API, Secure Transport, can be used in a non-blocking mode. Things like CFSocketStream and NSURLSession, actually use this facility to provide their async abstractions.

So I guess everything will be fine. Still the TLS API draft for Swift should state it as an explicit goal that it can be used in a non-blocking fashion.

Thanks,
  Helge

···

On 30 Jan 2017, at 10:59, Helge Heß <me@helgehess.eu> wrote:

However, I thought - and I may be very wrong here, which would be excellent - that SecurityFramework only supported blocking read and write callbacks and cannot be ‘paused’ until new data arrives.

Try this link:

password, if requested, should be "swiftify"

Regards

C (Chris) Bailey

Senior Technical Staff Member (STSM)
Hursley Park
Runtime Technologies for Java, Node.js and Swift
Winchester, Hampshire SO21 2JN
IBM Software Group
United Kingdom

Phone:
+44-1962-817078
IBM SDKs for Java™

Mobile:
+44-7738-310815 (272022)
IBM SDKs for Node.js™

e-mail:
baileyc@uk.ibm.com
IBM Monitoring and Diagnostic Tools

Find me on:

···

From: Joannis Orlandos via swift-server-dev <swift-server-dev@swift.org>
To: Luke² Hiesterman <luketheh@apple.com>
Cc: "swift-server-dev@swift.org" <swift-server-dev@swift.org>
Date: 06/02/2017 19:03
Subject: Re: [swift-server-dev] Next Server Security API Group
Meeting
Sent by: swift-server-dev-bounces@swift.org

Actually, Luke, the meeting should be starting now.

Joannis Orlandos
joannis@orlandos.nl

On 6 Feb 2017, at 20:02, Luke² Hiesterman via swift-server-dev < swift-server-dev@swift.org> wrote:

You’re a month early :)

Luke

On Feb 6, 2017, at 11:00 AM, Johannes Weiß via swift-server-dev < swift-server-dev@swift.org> wrote:

is this WebEx link correct? It asks me to enter a meeting number :thinking:

On 29 Jan 2017, at 13:52, Gelareh Taban via swift-server-dev < swift-server-dev@swift.org> wrote:

Hi all,

The next Security Group meeting will be Monday March 6th, (1-2pm CST) /
(11-12am PST) / (7-8pm GMT)

The agenda would be to go over the draft group pitch (
https://github.com/swift-server/security/blob/master/README.md\) and
discuss the project design goals and overall approach.

Webex:

password: swiftify

Regards,
Gelareh

_______________________________________________
swift-server-dev mailing list
swift-server-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-server-dev

_______________________________________________
swift-server-dev mailing list
swift-server-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-server-dev

_______________________________________________
swift-server-dev mailing list
swift-server-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-server-dev
_______________________________________________
swift-server-dev mailing list
swift-server-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-server-dev

Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number
741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU

Then why does it say March?

The next Security Group meeting will be Monday March 6th, (1-2pm CST) / (11-12am PST) / (7-8pm GMT)

Luke

···

On Feb 6, 2017, at 11:03 AM, Joannis Orlandos <joannis@orlandos.nl<mailto:joannis@orlandos.nl>> wrote:

Actually, Luke, the meeting should be starting now.

Joannis Orlandos
joannis@orlandos.nl<mailto:joannis@orlandos.nl>

On 6 Feb 2017, at 20:02, Luke² Hiesterman via swift-server-dev <swift-server-dev@swift.org<mailto:swift-server-dev@swift.org>> wrote:

You’re a month early :)

Luke

On Feb 6, 2017, at 11:00 AM, Johannes Weiß via swift-server-dev <swift-server-dev@swift.org<mailto:swift-server-dev@swift.org>> wrote:

is this WebEx link correct? It asks me to enter a meeting number :thinking:

On 29 Jan 2017, at 13:52, Gelareh Taban via swift-server-dev <swift-server-dev@swift.org<mailto:swift-server-dev@swift.org>> wrote:

Hi all,

The next Security Group meeting will be Monday March 6th, (1-2pm CST) / (11-12am PST) / (7-8pm GMT)

The agenda would be to go over the draft group pitch (https://github.com/swift-server/security/blob/master/README.md\) and discuss the project design goals and overall approach.

Webex:

password: swiftify

Regards,
Gelareh

_______________________________________________
swift-server-dev mailing list
swift-server-dev@swift.org<mailto:swift-server-dev@swift.org>
https://lists.swift.org/mailman/listinfo/swift-server-dev

_______________________________________________
swift-server-dev mailing list
swift-server-dev@swift.org<mailto:swift-server-dev@swift.org>
https://lists.swift.org/mailman/listinfo/swift-server-dev

_______________________________________________
swift-server-dev mailing list
swift-server-dev@swift.org<mailto:swift-server-dev@swift.org>
https://lists.swift.org/mailman/listinfo/swift-server-dev

It was corrected: [swift-server-dev] Next Server Security API Group Meeting **Corrected Date**

Regards,

Rob…

···

On 6 Feb 2017, at 19:04, Luke² Hiesterman via swift-server-dev <swift-server-dev@swift.org> wrote:

Then why does it say March?

The next Security Group meeting will be Monday March 6th, (1-2pm CST) / (11-12am PST) / (7-8pm GMT)

Luke

On Feb 6, 2017, at 11:03 AM, Joannis Orlandos <joannis@orlandos.nl <mailto:joannis@orlandos.nl>> wrote:

Actually, Luke, the meeting should be starting now.

Joannis Orlandos
joannis@orlandos.nl <mailto:joannis@orlandos.nl>

There was a follow-up mail to correct it to today.

Joannis Orlandos
joannis@orlandos.nl

···

On 6 Feb 2017, at 20:04, Luke² Hiesterman <luketheh@apple.com> wrote:

Then why does it say March?

The next Security Group meeting will be Monday March 6th, (1-2pm CST) / (11-12am PST) / (7-8pm GMT)

Luke

On Feb 6, 2017, at 11:03 AM, Joannis Orlandos <joannis@orlandos.nl <mailto:joannis@orlandos.nl>> wrote:

Actually, Luke, the meeting should be starting now.

Joannis Orlandos
joannis@orlandos.nl <mailto:joannis@orlandos.nl>

On 6 Feb 2017, at 20:02, Luke² Hiesterman via swift-server-dev <swift-server-dev@swift.org <mailto:swift-server-dev@swift.org>> wrote:

You’re a month early :)

Luke

On Feb 6, 2017, at 11:00 AM, Johannes Weiß via swift-server-dev <swift-server-dev@swift.org <mailto:swift-server-dev@swift.org>> wrote:

is this WebEx link correct? It asks me to enter a meeting number :thinking:

On 29 Jan 2017, at 13:52, Gelareh Taban via swift-server-dev <swift-server-dev@swift.org <mailto:swift-server-dev@swift.org>> wrote:

Hi all,

The next Security Group meeting will be Monday March 6th, (1-2pm CST) / (11-12am PST) / (7-8pm GMT)

The agenda would be to go over the draft group pitch (https://github.com/swift-server/security/blob/master/README.md\) and discuss the project design goals and overall approach.

Webex:
https://ibm2.webex.com/ibm2-en/j.php?MTID=m00fe55b2e62661e8568dd3728c8f8835 <The Page Cannot be found;
password: swiftify

Regards,
Gelareh

_______________________________________________
swift-server-dev mailing list
swift-server-dev@swift.org <mailto:swift-server-dev@swift.org>
https://lists.swift.org/mailman/listinfo/swift-server-dev

_______________________________________________
swift-server-dev mailing list
swift-server-dev@swift.org <mailto:swift-server-dev@swift.org>
https://lists.swift.org/mailman/listinfo/swift-server-dev

_______________________________________________
swift-server-dev mailing list
swift-server-dev@swift.org <mailto:swift-server-dev@swift.org>
https://lists.swift.org/mailman/listinfo/swift-server-dev

Agreed - the ability to run non-blocking definitely a goal.

Chris

···

From: Helge Heß via swift-server-dev <swift-server-dev@swift.org>
To: swift-server-dev <swift-server-dev@swift.org>
Date: 30/01/2017 10:59
Subject: Re: [swift-server-dev] Next Server Security API Group
Meeting
Sent by: swift-server-dev-bounces@swift.org

On 30 Jan 2017, at 10:59, Helge Heß <me@helgehess.eu> wrote:

However, I thought - and I may be very wrong here, which would be

excellent - that SecurityFramework only supported blocking read and write
callbacks and cannot be ‘paused’ until new data arrives.

I’m just told off-list that this is not true. The lowest-level TLS API,
Secure Transport, can be used in a non-blocking mode. Things like
CFSocketStream and NSURLSession, actually use this facility to provide
their async abstractions.

So I guess everything will be fine. Still the TLS API draft for Swift
should state it as an explicit goal that it can be used in a non-blocking
fashion.

Thanks,
  Helge

_______________________________________________
swift-server-dev mailing list
swift-server-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-server-dev

Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number
741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU

Oh well….so there was. Apparently I’m a month late :(

Luke

···

On Feb 6, 2017, at 11:09 AM, Joannis Orlandos <joannis@orlandos.nl<mailto:joannis@orlandos.nl>> wrote:

There was a follow-up mail to correct it to today.

Joannis Orlandos
joannis@orlandos.nl<mailto:joannis@orlandos.nl>

On 6 Feb 2017, at 20:04, Luke² Hiesterman <luketheh@apple.com<mailto:luketheh@apple.com>> wrote:

Then why does it say March?

The next Security Group meeting will be Monday March 6th, (1-2pm CST) / (11-12am PST) / (7-8pm GMT)

Luke

On Feb 6, 2017, at 11:03 AM, Joannis Orlandos <joannis@orlandos.nl<mailto:joannis@orlandos.nl>> wrote:

Actually, Luke, the meeting should be starting now.

Joannis Orlandos
joannis@orlandos.nl<mailto:joannis@orlandos.nl>

On 6 Feb 2017, at 20:02, Luke² Hiesterman via swift-server-dev <swift-server-dev@swift.org<mailto:swift-server-dev@swift.org>> wrote:

You’re a month early :)

Luke

On Feb 6, 2017, at 11:00 AM, Johannes Weiß via swift-server-dev <swift-server-dev@swift.org<mailto:swift-server-dev@swift.org>> wrote:

is this WebEx link correct? It asks me to enter a meeting number :thinking:

On 29 Jan 2017, at 13:52, Gelareh Taban via swift-server-dev <swift-server-dev@swift.org<mailto:swift-server-dev@swift.org>> wrote:

Hi all,

The next Security Group meeting will be Monday March 6th, (1-2pm CST) / (11-12am PST) / (7-8pm GMT)

The agenda would be to go over the draft group pitch (https://github.com/swift-server/security/blob/master/README.md\) and discuss the project design goals and overall approach.

Webex:

password: swiftify

Regards,
Gelareh

_______________________________________________
swift-server-dev mailing list
swift-server-dev@swift.org<mailto:swift-server-dev@swift.org>
https://lists.swift.org/mailman/listinfo/swift-server-dev

_______________________________________________
swift-server-dev mailing list
swift-server-dev@swift.org<mailto:swift-server-dev@swift.org>
https://lists.swift.org/mailman/listinfo/swift-server-dev

_______________________________________________
swift-server-dev mailing list
swift-server-dev@swift.org<mailto:swift-server-dev@swift.org>
https://lists.swift.org/mailman/listinfo/swift-server-dev