Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
mobileconfig
Advanced tools
Create and sign iOS mobileconfig configuration files.
Currently the module is able to auto configure and sign the following configuration payloads:
com.apple.mail.managed
eg. e-mail accounts (IMAP only at this point)Payload signing is handled by jsrsasign which is a JavaScript only crypto library. This means that you can generate your mobileconfig files even in Windows.
Require the module
const mobileconfig = require('mobileconfig');
Generate and sign Email account configuration with
mobileconfig.getSignedEmailConfig(options, callback);
Where
Generate and sign CardDAV configuration with
mobileconfig.getSignedCardDAVConfig(options, callback);
Where
Generate and sign CalDAV configuration with
mobileconfig.getSignedCalDAVConfig(options, callback);
Where
Generate and sign WiFi configuration with
mobileconfig.getSignedWifiConfig(options, callback);
Where
Generate and sign any valid mobileconfig configuration object. See ConfigurationProfile reference for details.
mobileconfig.getSignedConfig(plistData, keys, callback);
Where
Example
This example demonstrates generating and signing a profile file for an IMAP account.
mobileconfig.getSignedConfig([
PayloadType: 'Configuration',
PayloadVersion: 1,
PayloadIdentifier: 'com.my.company',
PayloadUUID: uuid.v4(),
PayloadDisplayName: 'My Gmail Account',
PayloadDescription: 'Install this profile to auto configure your email account',
PayloadOrganization: 'My Company',
PayloadContent: {
PayloadType: 'com.apple.mail.managed',
PayloadVersion: 1,
PayloadIdentifier: 'com.my.company',
PayloadUUID: uuid.v4(),
PayloadDisplayName: 'IMAP Config',
PayloadDescription: 'Configures email account',
PayloadOrganization: 'My Company',
EmailAccountDescription: 'Configure your email account',
EmailAccountName: 'John Smith',
EmailAccountType: 'EmailTypeIMAP',
EmailAddress: 'my-email-address@gmail.com',
IncomingMailServerAuthentication: 'EmailAuthPassword',
IncomingMailServerHostName: 'imap.gmail.com',
IncomingMailServerPortNumber: 993,
IncomingMailServerUseSSL: true,
IncomingMailServerUsername: 'my-email-address@gmail.com',
IncomingPassword: 'verysecret',
OutgoingPasswordSameAsIncomingPassword: true,
OutgoingMailServerAuthentication: 'EmailAuthPassword',
OutgoingMailServerHostName: 'smtp.gmail.com',
OutgoingMailServerPortNumber: 587,
OutgoingMailServerUseSSL: false,
OutgoingMailServerUsername: 'my-email-address@gmail.com',
PreventMove: false,
PreventAppSheet: false,
SMIMEEnabled: false,
allowMailDrop: true
}
], {
key: '-----BEGIN PRIVATE KEY-----...',
cert: '-----BEGIN CERTIFICATE-----...'
}, callback)
Signing configuration object defines the signing process and includes the following properties
NB You can use the same key and cert that you use for your HTTPS server. If the certificate is valid, then the profile is displayed as "Verified" in a green font, otherwise it is displayed as "Unverified"/"Not Verified" in a red font.
const mobileconfig = require('mobileconfig');
const options = {
emailAddress: 'my-email-address@gmail.com',
identifier: 'com.my.company',
imap: {
hostname: 'imap.gmail.com',
secure: true,
username: 'my-email-address@gmail.com',
password: 'mypass'
},
smtp: {
hostname: 'smtp.gmail.com',
port: 587,
secure: false,
username: 'my-email-address@gmail.com',
password: false // use the same password as for IMAP
},
keys: {
key: '-----BEGIN PRIVATE KEY-----...',
cert: '-----BEGIN CERTIFICATE-----...'
}
};
mobileconfig.getSignedEmailConfig(options, function (err, data) {
console.log(err || data);
});
Profile settings generated by this example used in iOS
Profile settings generated by this example used in OSX
See full featured example here
MIT
FAQs
Create and sign iOS mobileconfig configuration files
The npm package mobileconfig receives a total of 108 weekly downloads. As such, mobileconfig popularity was classified as not popular.
We found that mobileconfig demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.