ExtendOAuth v1
ExtendOAuth v1
CAN EXTEND
AUTHENTICATION OPTIONS
WITH NEW ADDITIONAL
OAUTH2 IDENTITY PROVIDERS
IN THE FILEMAKER PLATFORM
—By—
The views and recommendations expressed in this White Paper are solely those
of the authors and may not necessarily reflect those of Claris International, Inc.
FileMaker, FileMaker Go, and the file folder logo are registered trademarks of Claris
International, Inc. (formerly FileMaker, Inc.) in the U.S. and other countries. FileMaker
WebDirect and FileMaker Cloud are trademarks of Claris International, Inc.
CONTENTS
Acknowledgements ..........................................................................................32
How To Extend oAuth2 Functionality In The FileMaker Platform—Version 1.0 iii
EXECUTIVE SUMMARY
Since the advent of External Authentication based on the oAuth2 Protocol that
Claris International, Inc. introduced in FileMaker® Server 16, some developers have
searched for ways to expand the number of Identity as a Service (IDaaS) Providers that
they could employ to provide authentication for access to hosted FileMaker Pro files.
FileMaker Server allowed for three such providers, only one of which supported group
structures.
Based on some work done at a FileMaker Platform customer with assistance from
Claris Consulting Engineers and Product Development Engineers1 the authors—both
long-time FileMaker Server and Security experts—experimented with and devised
methods to expand the universe of IDaaS Providers. We are pleased to advise both
developers and customers that we have thoroughly documented the requirements
for making the underlying mechanism work, and we have at least five new
providers working. And we believe that there are more to come. This document will
allow you to evaluate whether your preferred IDaaS provider can be made to work with
the current versions of the FileMaker platform. In a subsequent Addendum to this White
Paper to be released at a latter date, we hope to provide some Case Studies about
implementation of this feature at actual FileMaker customer locations.
This White Paper explains the reasons for wishing to expand these services and
the importance of Federated Identity Management and the Zero Trust Model. It also
provides detailed and specific instructions, complete with illustrations, of what
configuration changes Developers and Administrators need to make using Okta as an
example IDaaS. We hope—and dare to expect—this means, among other items, that the
FileMaker Platform can now be used in organizations where heretofore it was
disqualified due to lack of support of these Authentication options.
1
We are grateful to a number of our colleagues at Claris International, Inc. (formerly FileMaker, Inc.). for
their assistance in the preparation of this White Paper and for their work at the customer site in
investigating this process. Their names are listed on Page 32.
HOW FILEMAKER DEVELOPERS CAN EXTEND
AUTHENTICATION OPTIONS WITH NEW ADDITIONAL
OAUTH2 IDENTITY PROVIDERS IN THE FILEMAKER PLATFORM
F
Version 1.0
OVERVIEW
In this White Paper we will cover a number of specific items related to this topic:
• Federated Identity
• Applicability To FileMaker Platform
• How To Make It Work
• How To Extend To Other IDaaS Services
• Some Caveats To Consider
Expansion of IDaaS options for the FileMaker Platform provides a number of
significant advantages to FileMaker developers and end-user customers. Among other
items it enhances the capabilities of the Platform to meet varied requirements related to
Identity and Access Management (IAM) in a variety of organizations. Likewise, it
facilitates adoption of Federated Identity Management (FIdM) by commercial, not-for-
profit, and public-sector organizations wishing to employ modern IDaaS systems.
Additionally, it facilitates adoption of Zero Trust Model2 for Information Security.
Allow us to expand a bit on this important concept.
Users and Data and Systems are everywhere…
Businesses use more and more cloud-based services and Software-as-a-Service
(SaaS) applications. In practical terms that means that the business data are in more
places than ever before. Access to that data is governed by these separate systems, and
that creates a challenge around uniform and centralized user Authentication and
Authorization.
The challenge is to authenticate user identity assertions and then have that
authentication be passed to those numerous data sources so that the user will have the
proper privileges in the proper application. Ideally there should be only one central
place where identities are created and managed. This consolidation of Identities reduces
the Attack Vector surface hackers can use to compromise Identities. It also facilitates
easier provisioning and deprovisioning of Accounts in organizations. When duplicate
identities exist, there is always the risk of mismatched privileges, maintenance hassles
and possibly more attack points that can be compromised.
Traditional network perimeters3 no longer exist, and Identity is the top attack
vector against digital assets.
2
https://fmforums.com/files/file/105-federated-identity-management-zero-trust-and-the-filemaker-
platform/
3
Over 150,000 Cloud applications. Over 8 billion mobile devices world-wide. Over 50 billion IoT devices
world-wide.
How To Extend oAuth2 Functionality In The FileMaker Platform—Version 1.0 3
Thus, Identity Is the New Security. A connection from a particular network must
not determine user’s access to services. Users must be challenged and verified. The three
Core Principles of Zero Trust describe this:
• What do we know about you?
• What do we know about your device?
• All access to all services must be authorized once authentication is
verified.
This means we verify the user with a variety of challenges. Then we validate the
device. Then we limit access and privileges based on these challenges. This process
needs to be adaptive and behavior-based, changing with circumstances and may
therefore require machine learning.
4
SAML 101, p. 6. (Ping Identity. Denver, CO. April 2017. www.pingidentity.com)
https://www.pingidentity.com/content/dam/pic/downloads/resources/white-papers/en/saml-101-white-
paper.pdf See also a webinar presented by Pamela Dingle, at the time, Principal Technical Architect at
Ping, now Director of Identity Standards at Microsoft. Emerging Standards on the Identity Landscape.
https://www.pingidentity.com/en/resources/webinar-replays/emerging-standards-on-the-identity-landscape-
replay.html
How To Extend oAuth2 Functionality In The FileMaker Platform—Version 1.0 4
FIdM is not the same thing as Single Sign-On; however, Single Sign-On (SSO)
can be an attribute of Federated Identity. The core purpose of FIdM is to enable
portability of identity information across autonomous security domains. This
eliminates the need for new Account registration in multiple domains with the resulting
redundant log-ons. This enables an organization to identify and authenticate a user once
and then use that information across multiple systems.
It is very important to distinguish among several terms related to IAM that are
frequently interchangeably used, thus promoting confusion. First, Authentication is
distinct from Authorization. The former refers to a process for validating Identity
Assertions. Are you who you say you are, and how do we know that? Then, once we
have validated your Assertion, we grant you Authorization to access various digital
assets, e.g. a FileMaker Pro hosted database, with specific rights and privileges.
vvWe have documented the underlying mechanism that FileMaker Server uses
and have identified at least five major IDaaS providers whose oAuth2 capabilities we can
leverage to permit their use in the FileMaker Platform environment. We have tested and
verified Ping Federate,5 Okta,6 OneLogin,7 Auth0,8 and MiniOrange9 as working
with FileMaker Server. We are testing others. If the provider supports the OAuth2
protocol and can support the exchange of information about the user in the way that
FileMaker Server expects, then we are hopeful it will work with FileMaker Server.
vKeep in mind that in this White Paper all our discussions and descriptions are
focused on Authentication, namely: who are you, are you who you claim to be, and how
do we know that. The Authorization process remains the same; it is entirely controlled
by the FileMaker Pro Privilege Set. Using an OAuth provider does not change the
authorization you use in your FileMaker Pro solution.
vAuthentication is distinct from Single Source Log-on or Single Sign-on (SSO)
as previously noted. SSO is a method to allow authentication to be passed from one
source to another. In the FileMaker Platform environment, authenticating a user by an
external process (rather than by an internal Account) may employ SSO; conversely, it
may not do so, nor is it required to use SSO to achieve authentication.
vWe must also carefully distinguish an Identity Provider from a Service
Provider. This process is complicated by the fact that some IDaaS processes can be both
at the same time. An Identity Provider is just that: it contains the elements needed to
establish a valid authentication of an Identity Assertion. A Service Provider acts as a
broker. It queries an Identity Provider such as Active Directory for valid assertions and
then passes the results of that process along to the system requesting the authentication
5
www.pingidentity.com/en.html
6
www.okta.com
7
www.onelogin.com
8
www.auth0.com
9
www.miniorange.com
How To Extend oAuth2 Functionality In The FileMaker Platform—Version 1.0 5
for purposes of granting authorized access. The Service Provider delegates the
authentication to the Identity Provider.
The Okta example we will show however uses Okta’s internal user repository; so,
Okta acts as an Identity Provider at the outset.
If you are looking for information on how to configure the three “traditional”
OAuth providers, you may wish to consult an earlier White Paper10 about configuring
FileMaker Server to use OAuth2 that we released when FileMaker Server 16 deployed.
So, what did we actually do to enable other IDaaS providers to work with
FileMaker Server? What is needed to make this happen?
To avoid confusion: this mechanism only works with providers supporting OAuth
and OpenID Connect; it does not work with providers who only support SAML. SAML-
based authentication currently is not supported in the FileMaker platform.
We have been able to make the OAuth flow work with both FileMaker Server 18
and 17 and FileMaker Pro Advanced 17 and 18. We have also successfully made this
work with WebDirect™ with several major browsers. It feels like it should work with
FileMaker Pro Advanced 16 as well, but we have not been able to make it work.
For this section we chose Okta as an example of how to accomplish this
extensibility. Okta is a Forrester Wave™ Leader11 for IDaaS; and, we have come across
it at various clients, so it makes for a very good test scenario.
10
https://fmforums.com/files/file/91-oauth-identity-providers/
11
https://www.okta.com/resources/analyst-research-forrester-wave-leader-identity-as-a-service/
How To Extend oAuth2 Functionality In The FileMaker Platform—Version 1.0 6
To understand how the Provider’s configuration needs to be set up, we must first
understand what FileMaker Server expects to receive at the end of the authentication
exchange and how FileMaker Server uses that information to grant access to a hosted file.
And for that we need to take a look at how the OAuth 2 protocol works. In particular we
are interested in Open ID Connect12 (OIDC), which is the simplest way to implement
this. From the OIDC web site:
“OpenID Connect 1.0 is a simple identity layer on top of the OAuth 2.0 protocol. It allows Clients
to verify the identity of the End-User based on the authentication performed by an Authorization
Server, as well as to obtain basic profile information about the End-User in an interoperable and
REST-like manner.”
12
https://openid.net/connect/
How To Extend oAuth2 Functionality In The FileMaker Platform—Version 1.0 7
Similarly, FileMaker Server provides a URL for us to use in the IDaaS Provider’s
configuration of the “application.”
• The Redirect URL (where the IDaaS provider will send the result of the
authentication)
There are a few different OAuth flows13 and depending on your IDaaS provider
you may have to select explicitly the proper one. FileMaker Server uses the
“Authorization code flow.” The whole exchange goes as follows:
1. User selects a file from a FileMaker Server that is properly configured,
and clicks on the OAuth provider’s button on the FileMaker login dialog:
2. FileMaker Server calls the authentication URL for the IDaaS provider
together with a random string called the “state.” The state will be included
in the IDaaS’ response to FileMaker Server so that it can verify that the
13
These flows are often referred to as “grant types.” See https://oauth.net/2/grant-types/
How To Extend oAuth2 Functionality In The FileMaker Platform—Version 1.0 8
response is from the IDaaS provider and not from some impersonator. In
Open ID terms, FileMaker Server is the “relying party”: the party making
the request. The IDaaS provider is the “OpenId Provider.”
3. The user’s browser will show the login page for the provider.
4. The user authenticates at the IDaaS by whatever means are set up at the
IDaaS. This could be simply typing in a username and password; it could
be inserting an ID card into a reader, providing a fingerprint, or a
combination of factors.
6. FileMaker Server receives the code and verifies the “state” and calls the
IDaaS’ Token URL to exchange the code for a set of tokens. FileMaker
Server also includes the Client ID and the Client Secret for the IDaaS
“application” so that the IDaaS knows what to include in the user’s
profile: namely what groups the user belongs to for the “application”
identified by that Client ID and Secret.
7. The IDaaS provider verifies the code and sends a JSON response to
FileMaker Server that contains a set of tokens. One of these tokens is the
How To Extend oAuth2 Functionality In The FileMaker Platform—Version 1.0 9
8. FileMaker Server reads the id_token and extracts the user’s email address
and the list of groups. FileMaker evaluates whether one of the Groups
matches the name of a group as set up in the security schema of the
FileMaker file and allows access to the file if there is a matching group.
Note that steps 3 and 4 may not happen if the user is already authenticated by the
IDaaS in the browser’s session. In that case, typically a blank web page will be shown,
and the flow jumps straight to step 5.
The set of tokens that FileMaker Server receives in step 7 from the provider looks
like this:
{
"access_token":
"NWE4Nzg2ZDEtNzQyMS00ZDViLThjMjctMGQwNjlmZjU5MWNkBGjFElT7CWzl0d....",
"expires_in":
3600,
"id_token":
"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IkpSY080bnhzNWpnYzhZZE43STJoTE80V...",
"token_type":
"Bearer",
"refresh_token":
"897987AGBEtNzQyMS00ZDViLThjMjctMGQwNjlmZjU5MWNkBGjFElT7CWzl0d...."
}
14
JSON Web Token - https://tools.ietf.org/html/rfc7519
15
There are some good online tools to help with decoding JWT for debugging purposes: https://jwt.io/ and
https://www.jsonwebtoken.io/
How To Extend oAuth2 Functionality In The FileMaker Platform—Version 1.0 10
Most of these claims are irrelevant for the task at hand, but if the token does not
contain the claim for “groups” then FileMaker Server will not be able to match the
authenticated user to its own group accounts, and the user will not get access to the
FileMaker file. The claim for “email” or “unique_name” is used for the
Get(AccountName) function.
With some IDaaS providers you need specifically to add a claim for the email,
some include it by default. Typically, it is easy to make sure that “email” is included.
But if you run into problems configuring your chosen IDaaS, it will largely be
because of the “groups” claim. Not all of the IDaaS providers provide an id_token with
the groups claim just named “groups” or with the groups data in the expected array
format.
The reason for this is that “groups” is not a standard claim. It is widely used
though and the Open ID Connect standard recommends that all additional (non-standard)
claims use name-spacing to avoid naming conflicts.16 What this means in practice is that
the id_token from some providers will look like this:
{
"http://yourdomain/claims/groups":
[
"fm_group_1"
],
"email":
"[email protected]",
"email_verified":
true,
"iss":
"https://some_privider.com/",
"sub":
"auth0|5d78f8d7ef51960e39cce361",
"aud":
"YowRSjyKx37apnUlFPbn8hUJHWfB3z50",
"iat":
1568227905,
"exp":
1568263905,
"c_hash":
"I_iHUdwzP9883GFGGDdYzQ",
"nonce":
"f8jaskrkn97"
}
with the word “groups” preceded by a chosen prefix. If the provider insists on following
the OpenID recommendation, then that name-space prefix needs to be included in the
FileMaker Server configuration that we will discuss later in this document.
If the provider cannot be configured to include a groups claim then you can still
use that provider for individual Account authentication, similar to what we can do with
Google and Amazon accounts. This means that you need to create an account in the
FileMaker file for each individual user.
Auth0 for example enforces the recommendation.
16
https://openid.net/specs/openid-connect-core-1_0.html#AdditionalClaims
How To Extend oAuth2 Functionality In The FileMaker Platform—Version 1.0 11
Now that we know how the authentication and access-granting flow works, we
will turn to Okta and see how we need configure it.
In this section we will run through the configuration options that need to be made
on the Okta side.
For this test scenario, we are using users and groups that exist in Okta’s own
“directory service” but of course these could come from any Identity Provider that Okta
can work with: classic providers such as Active Directory, any LDAP directory, but also
a myriad of other providers in the social realm (Facebook, LinkedIn, Google, …) and
more general connectors to providers through OpenID or SAML.
In the configuration options, name your application and enter the FileMaker
Server redirect URL:
How To Extend oAuth2 Functionality In The FileMaker Platform—Version 1.0 14
Note that when using any external OAuth provider (the traditional three or any
supplemental one that you configure), your FileMaker Server needs to be reachable
through public DNS on HTTPS (port 443 or a custom port of your choosing).
The other Okta application settings can remain as they are for now. When you
save the settings, you will end up on the General tab of your Application. At the bottom
of that page Okta will list the Client ID and Client Secret for the application.
Keep a note of these two as they will be needed when we configure FileMaker
Server.
How To Extend oAuth2 Functionality In The FileMaker Platform—Version 1.0 16
At the top of the page, verify that the green icon is highlighted to indicate that
OpenID Connect is enabled for the application:
At this point we want to allow our existing “Devs” group to use this application.
Still on the application, select the “Assignments” section, click the green “Assign” button
and select “Assign to Groups” as shown:
Okta will show your available groups, select “Devs” to complete this part of the
process.
How To Extend oAuth2 Functionality In The FileMaker Platform—Version 1.0 17
Up to this point, the process has been fairly standard, and all providers have small
variations in how to set up an application and assign users or groups to it, but for the most
part it is straightforward.
The next part varies a lot more by provider, this is the part where we need to
make sure that the id_token that is returned after a successful authentication by Okta
contains the information that FileMaker Server needs. The steps below are specific to
Okta and will be completely different for other providers, but the concept is the same for
all of them.
The required configuration is done through “scopes” and “claims.” A scope is a
set of attributes that describes a user, each of those attributes is called a claim. Every
OpenID Connect exchange requires the “openid” scope, which will return the basic
claims that make the exchange work. Since we want to include group data we need to
add a groups scope and a groups claim.
How To Extend oAuth2 Functionality In The FileMaker Platform—Version 1.0 18
In Okta, select API > Authorization Servers and select the Default server.
The scope labeled “email” is one that we need for FileMaker Server to identify
the user. But there is no “groups” scope so we will need to add one:
And then under “claims” (Figure 18), we will add a claim for the Groups data
itself and link the claim to the scope. The relevant settings are:
• Include in token type: this must be set to ID Token (which determines the content of
id_token) because that is where FileMaker Server will look for the data.
• Value Type: is set to groups because that is the data we want to include and to make
sure we get all the group names, we set the filter to a regular expression that will
return everything (“.*”).
• Include in: this is where we link this claim to the groups scope we created earlier.
How To Extend oAuth2 Functionality In The FileMaker Platform—Version 1.0 20
One of the nice features in Okta is that we can test the configuration immediately
to see what token it will produce. For that, go to the “Token Preview” section and select
your application, set Grant Type to “Authorization Code” (as you remember from the
flow, steps 5 and 6 indicate that an authorization code exchange is happening). Next
select a user that belongs to the Devs group that was assigned to the application and
finally add “openid”, “groups” and “email” to the scopes. The Payload under id_token on
the right-hand side shows what FileMaker Server will receive. And it does contain the
email and the list of groups in exactly the format that we know will work.
How To Extend oAuth2 Functionality In The FileMaker Platform—Version 1.0 21
While we are on the Authentication Server settings, we can grab the URLs for the
Authentication Request and Token Request, we will need them to configure FileMaker
Server. From the “Settings” section, click on the link for the metadata:
How To Extend oAuth2 Functionality In The FileMaker Platform—Version 1.0 22
That link will display some json information about the authentication server and
from it we will note the two URLs:
Note: the steps below involve stopping the database server, so only do this in a
production machine when it will not inconvenience your users!
The FileMaker Server Admin Console allows us to configure the three traditional
OAuth providers but there is no UI to add other ones. Since the Microsoft Azure AD
provider is the only one of those three pre-configured ones that contains groups, we will
use that one as the basis for our setup.
Click “change” next to the Microsoft entry and type in some meaningless text for
each of the provided spaces. Our only intent here is for FileMaker Server to generate the
necessary configuration entries.
Save the settings and in the bottom section enable “FileMaker and External
Accounts” and the Microsoft entry:
How To Extend oAuth2 Functionality In The FileMaker Platform—Version 1.0 24
Close all the hosted files and stop the database server. Stopping the database
server is crucial, otherwise all configuration changes discussed below will not be saved.
Open that file with a text editor—not with a word processor— and scroll down
in that file until you see the section named “oAuthProviders” as shown in Figure 25.
How To Extend oAuth2 Functionality In The FileMaker Platform—Version 1.0 25
If your chosen provider requires name-spacing the groups claim, then there is one
additional key to update: OAuthGroupScheme. In that key’s value include the complete
name-spaced string that you have configured on the provider’s side. This is our Auth0
configuration as an example:
17
For the correct URL syntax: https://developer.okta.com/docs/reference/api/oidc/#_1-single-sign-on-to-
okta
How To Extend oAuth2 Functionality In The FileMaker Platform—Version 1.0 27
Save the edits and start FileMaker Server again. Open the xml file again to verify
that the edits are still there and have not been overwritten by FileMaker Server on restart.
In the FileMaker Server Admin Console, the interface will revert back to show
that no OAuth providers have been configured, but that is entirely normal.
The final part is to make the required changes in the FileMaker file. There we
need to create groups that match the relevant groups that exist in Okta.
In “Manage Security”, select “Microsoft Azure AD” as the provider and add a
group account that matches exactly the name of the group as it exists in Okta. This is
shown below.
If you are working with an IDaaS provider that does not provide the group
information or enforces name-spacing on the group claim then you can still create
“User” accounts in this section for each individual user.
How To Extend oAuth2 Functionality In The FileMaker Platform—Version 1.0 28
When a user now logs into this FileMaker file hosted on our configured
FileMaker Server and clicks the provider’s button, the whole flow as described on page 7
completes successfully.
The Get() functions that provide information about the user’s Account and
Privilege Set report this:
The Get(AccountName) is taken from the “email” value in the id_token.18 The list
of groups in that id_token is matched with the groups in the FileMaker file, and the match
was “Devs” which goes into Get(AccountGroupName). The Get(AccountType) is hard-
wired to report “Azure” since we are using the Azure AD section of the configuration.
In conclusion: if the IDaaS provider can be configured to return “email” and
“groups” claims in the id_token, then you can use that provider with FileMaker Server to
do Group-based authentication to your FileMaker apps.
18
Or the “unique_name” claim if there is no “email” claim in the id_token.
How To Extend oAuth2 Functionality In The FileMaker Platform—Version 1.0 29
• There are some configuration options that we cannot update such as the
provider’s logo: it will always be the Microsoft logo when using
FileMaker Pro Advanced and no logo when using WebDirect.
• There are subtle differences between FileMaker Pro Advanced 17 and 18;
17 will show the name of the configured provider but 18 just shows
“Microsoft” regardless of what name was used in the dbs_config.xml file.
• It may be obvious but this whole setup only works for files hosted on
FileMaker Server. It does not work on FileMaker Cloud since you do not
have access to the dbs_config.xml file to make the required changes. It
should work on FileMaker Cloud for AWS.
• You can add multiple OAuth providers to the dbs_config.xml file.
However, since they will all be based on the Microsoft Azure AD
“template” the buttons on the FileMaker Pro interface will be confusing as
they will all display the Microsoft name and logo. WebDirect does show
the names you used in the xml file. This should not typically be an issue
on production servers since we expect that only one provider will be used.
But it may be an issue on development and test servers.
How To Extend oAuth2 Functionality In The FileMaker Platform—Version 1.0 30
19
https://tools.ietf.org/html/rfc7515
20
https://tools.ietf.org/html/rfc7516
How To Extend oAuth2 Functionality In The FileMaker Platform—Version 1.0 31
ACKNOWLEDGMENTS
The authors appreciate the assistance and information we received from various
persons at Claris International, Inc. Their work was the impetus for this White Paper. The
FileMaker Developer Community and the customer base both owe them a large debt of
gratitude.