Our discovery engine need to have access to the systems (aka ‘data sources’) that will be analyzed. Here are instructions on how to create these accounts and permissions.
Azure Service Principal
Prerequisites
You need to have permissions to create App Regristrations in Azure Active Directory in order to complete this.
In order to use the API to access Teams information, a spesific request to microsoft has to be performed.
It takes about one to two weeks for Microsoft to process the request.
Add following permissions:
GroupMember.Read.All
Channel.ReadBasic.All
ChannelMessage.Read.All - must be given to both the app and the owner
Getting access to the Microsoft Graph API
Teams uses the Microsoft Graph API to retrieve data. Creating an account on the Microsoft Azure portal is required for the Teams connector to retrieve values for Client ID, Client Secret, and Tenant ID.
Users must complete this form to get access to Microsoft protected APIs.
It takes about one to two weeks for Microsoft to process the request.
To enable access to this API:
Perform the New App Registration procedure to acquire the necessary credentials.
Google Service Account
To create a service account:
In the Service accounts page, select the relevant Gmail project
Click + Create service account
Under Service account details, type a name, ID, and description for the service account, then click Create and continue
(Optional): Under Grant this service account access to project, select the IAM roles to grant to the service account*
Click *Continue
(Optional): Under Grant users access to this service account, add the users or groups that are allowed to use and manage the service account
Click Done
Click + Create key, then click Create to add a new service account key
Adding a service account key:
Select the service account that you created
Click the Keys tab
Select Create new key from the Add key drop-down list
Click Create
Add the following permissions depending on what system you are giving access to:
Google Permissions
To grant service account scopes:
Prerequisites
Contact sharing need to be enabled:
(https://admin.google.com > Directory > Directory settings > Directory and set Contact sharing > Enabled)
Use the client ID as the client name and grant scopes to the service account:
(https://admin.google.com > Security > Access and data control > API controls > Manage domain wide delegation)
https://www.googleapis.com/auth/drive for accessing the files of the drive.
Grant https://www.googleapis.com/auth/drive.readonly instead, if you’re adding the permission_drive_readonly custom parameter.
https://www.googleapis.com/auth/admin.directory.user.readonly for listing the users in the G‑Suite domain to scan all of their files
You need super administrator access to the relevant Google Workspace account to perform this procedure.
To set up domain-wide delegation of authority for a service account:
In the Google Cloud console*, navigate to Menu > IAM & Admin > Service Accounts
In the Service Accounts window, select your service account and click Show advanced settings
Under Domain-wide delegation, find your service account’s Client ID and copy its value.
In the Google Admin console, navigate to Menu > Security > Access and data control > API controls
In the API controls window, click Manage Domain Wide Delegation
Click Add new
In the Client ID field, paste the client ID you copied previously.
In the OAuth Scopes field, enter a comma-delimited list of the scopes required by your application. These should be the same set of scopes that you defined when configuring the OAuth consent screen.
https://www.googleapis.com/auth/gmail.readonlyhttps://www.googleapis.com/auth/admin.directory.user.readonly
To support OAuth connectivity to Salesforce user accounts, set up these permissions in the OAuth configuration:
Access your basic information
Access and manage your data
Perform requests on your behalf at any time
User profile configuration
Prerequisites
Requires Salesforce admin permissions
To enable API access in Salesforce by profile:
Click Setup
Click Manage Users > Profiles
Click Edit against the specific profile
Scroll down to Administrative Permissions and check the API Enabled box
Click Save
To enable API access in Salesforce by permission set:
Click Setup
Click Manage Users > Permission Sets
Select the *specific Permission Set.
Click System > System Permissions > Edit
Check the API Enabled box
Click Save
For additional information on enabling API access in Salesforce, click here
SQL & noSQL
In order to scan any of the below databases, read-only access has to be given. Some can use service accounts or service principals, and some need a basic database user.
Warning
These guides are general guides on how to create database users and with read-only access. Make sure that you have experience with the database that you use before perfoming any actions on it.
Always let you database admin assist, or have them perfom the actions.
Database Permissions
Create a user in MongoDB with read access to the databases to analyze
Commands for creating a user in the admin database with read access to all databases
Enter mongo shell: mongo -h localhost -authenticationDatabase=admin -u MyUser
This is an example of how to create a readaccess group and add a new user to that group.
Any already exiting group can be used instead.
-- Create a group
CREATEROLEreadaccess;-- Grant access to existing tables
GRANTUSAGEONSCHEMApublicTOreadaccess;GRANTSELECTONALLTABLESINSCHEMApublicTOreadaccess;-- Grant access to future tables
ALTERDEFAULTPRIVILEGESINSCHEMApublicGRANTSELECTONTABLESTOreadaccess;-- Create a final user with password
CREATEUSERmynewpsqluserWITHPASSWORD'secret';GRANTreadaccessTOmynewpsqluser;
If you wish to grant select on dictionary views then:
grantselectanydictionarytouser_read_only;
Login to mysql: mysql -u root -p
-- Create a new MySQL user
CREATEUSER‘$user‘@’127.0.0.1’IDENTIFIEDBY‘$password‘;-- Grant read-only permission to the MySQL user
GRANTSELECT,SHOWVIEWON$database_name.*TO$user@’127.0.0.1′IDENTIFIEDBY‘$password‘;FLUSHPRIVILEGES;
If you want to use SSL connection, you can use the following instead:
The Microsoft SQL connector supports multiple types of authentication methods:
Connecting to Azure SQL using User Credentials authentication
Connecting to Azure SQL using ActiveDirectoryMSI (Azure AD)
Connecting to Azure SQL using AAD Service Principal authentication
Configuring Kerberos-based Windows integrated authentication
Configuring Windows Integrated NTLM
The instructions below will only show how to create a read-only database user
To create a read-only database user account for Microsoft SQL Server
Start Microsoft SQL Management Studio
In the Connect to Server window, in the Server name box, select the SQL Server computer on which the database is installed
In the Authentication box, click SQL Server Authentication
In the Login box, type a user name that has permissions to create new accounts
In the Password box, type the password for the user name
Click Connect
On the SQL Server Management Studio window, in the Object Explorer pane, right-click Security, and then click New > Login
In the Login-New dialog box, perform the following tasks in the order in which they appear:
In the Select a page pane, click General
In the right pane, in the Login name box, type a logon name for the new user
Check SQL Server authentication, type a password for the user, and then confirm the password
Uncheck User must change password at next login
In the Default database box, select the database to be read by this user.
In the Login-New dialog box, in the Select a page pane, click Server Roles
In the right pane, click public
In the Login-New dialog box, in the Select a page pane, click User Mapping
In the right pane, under Users mapped to this login, make sure that you have selected the database to read.
Under Database role membership for the database, click db_datareaderThis role gives the user read-only data access to the database. The role of public is always selected and cannot be cleared*