SimpleSaml Memcache Username/Password - simplesamlphp

After looking at the documentation, I can't figure out how to set the memchached username and password for a memcache_store server. Does anybody know?
https://simplesamlphp.org/docs/stable/simplesamlphp-maintenance#section_2

If you are using 'store.type' => 'sql', then add:
'store.sql.dsn' => 'mysql:host=' . DB_HOST . ';dbname=' . DB_NAME,
'store.sql.username' => DB_USER,
'store.sql.password' => DB_PASSWORD,
to /saml/config/config.php

Related

Node.js Oracle LDAP TNS Could not resolve the connect identifier specified

I had connected to oracledb with nodejs with hostname and servicename and it was working fine with below syntax:
connection =await oracledb.getConnection({
user: 'username',
password: 'pwd',
connectString: 'hostname:port/servicename'
});
Our database details recently changed to LDAP connectivity and I have hence updated the connectString as below:
connection =await oracledb.getConnection({
user: 'username',
password: 'pwd',
connectString:'jdbc:oracle:thin:#ldap://<LDAP Server>:port/<Database Service Name>,cn=OracleContext,dc=<domain>,dc=com'
});
However I get error: ORA -12154:TNS could not resolve the connect identifier specified
I checked with our DBA and they do not use ORA files and neither did I have those before in my network/admin folder. Do I still need to add the same.
I am new to Oracle DB and I did not find resolutions which helped me on this and hence posting the issue.
Appreciate any help.
jdbc is Java - not node.js (which is JavaScript)
Try
{
user: 'username',
password: 'pwd',
connectString:'<Database Service Name>'
}
You must configure the LDAP settings in ldap.ora file, for example like this:
DEFAULT_ADMIN_CONTEXT = "dc=<domain>,dc=com"
DIRECTORY_SERVERS = (<LDAP Server>:port)
DIRECTORY_SERVER_TYPE = OID
and set it also in sqlnet.ora:
NAMES.DEFAULT_DOMAIN = <domain>.com
NAMES.DIRECTORY_PATH = (LDAP, TNSNAMES)
SQLNET.INBOUND_CONNECT_TIMEOUT = 10

LDAP authentication failing

I have a nodejs application that successfully authenticates using LDAP locally using passport-ldapauth.
However, in another environment it is not working. I have written a .net app that can successfully query LDAP. The different is that it uses NTLM.
I am not familiar with NTLM and how this affects my nodejs project.
LDAP_URL = ldap://<ldap_server_ip address>
LDAP_BIND_DN = ldapadmin
LDAP_BIND_CREDENTIALS = password123
LDAP_SEARCH_BASE = DC=mydomain,DC=com
LDAP_SEARCH_FILTER = (sAMAccountName={{username}})
Am I talking apples and oranges here? I get invalid credentials even though they work in my .net app.
nodesjs code:
super(
(
request: Request,
callback
) => {
const options = {
server: {
url: getEnvValue('LDAP_URL'),
bindDN: getEnvValue('LDAP_BIND_DN'),
bindCredentials: getEnvValue('LDAP_BIND_CREDENTIALS'),
searchBase: getEnvValue('LDAP_SEARCH_BASE'),
searchFilter: getEnvValue('LDAP_SEARCH_FILTER'),
},
passReqToCallback: true,
};
callback(null, options);
}
);
Any thoughts would greatly appreciated.
Gina
After many many hours, the answer was simpler than expected:
LDAP_BIND_DN = mydomain\ldapadmin
Gina

Property 'MAIL_URL' does not exist on type 'ProcessEnv'

I'm using Meteor 1.6 and Node 9.2.0 and I want to send an email using the Email package but I get this error when I want to set the environment variable MAIL_URL
Property 'MAIL_URL' does not exist on type 'ProcessEnv'
Meteor.startup(() => {
let smtp = {
username: 'alaeddine.baghdadi1#gmail.com',
password: '******',
server: 'smtp.gmail.com',
port: 465
};
process.env.MAIL_URL = 'smtp://' + encodeURIComponent(smtp.username) + ':' + encodeURIComponent(smtp.password) + '#' + encodeURIComponent(smtp.server) + ':' + smtp.port;
Thanks
Maybe you should try with process.env.MAIL_URL instead of ProcessEnv.MAIL_URL ?
See How do I set environment variable in Meteor's provided server? for more information.
Hope it helps.

How to connect my LDAP with an existing ldap system in Laravel 5.4

I have to connect my ldap with an existing ldap system with the following conditions:
Domain used is 12.14.4.38
Username 0000001 and password 123456.
I've opened this link , but I still don't understand how to use it. This is my adldap.php code
<?php
return [
'connections' => [
'default' => [
'auto_connect' => true,
'connection' => Adldap\Connections\Ldap::class,
'schema' => Adldap\Schemas\ActiveDirectory::class,
'connection_settings' => [
'account_prefix' => env('ADLDAP_ACCOUNT_PREFIX', ''),
'account_suffix' => env('ADLDAP_ACCOUNT_SUFFIX', ''),
'domain_controllers' => explode(' ', env('ADLDAP_CONTROLLERS', '12.14.4.38')),
'port' => env('ADLDAP_PORT', 389),
'timeout' => env('ADLDAP_TIMEOUT', 5),
'base_dn' => env('ADLDAP_BASEDN', 'dc=12.14.4.38'),
'admin_account_suffix' => env('ADLDAP_ADMIN_ACCOUNT_SUFFIX', ''),
'admin_username' => env('ADLDAP_ADMIN_USERNAME', '0000001'),
'admin_password' => env('ADLDAP_ADMIN_PASSWORD', '123456'),
'follow_referrals' => false,
'use_ssl' => false,
'use_tls' => false,
],
],
],
];
// Create a new Adldap Provider instance.
$provider = new \Adldap\Connections\Provider(connections);
$ad = new \Adldap\Adldap(connections);
try {
// Connect to the provider you specified in your configuration.
$provider = $ad->connect('default');
// Connection was successful.
// We can now perform operations on the connection.
$user = $provider->search()->users()->find('0000001');
} catch (\Adldap\Auth\BindException $e) {
die("Can't connect / bind to the LDAP server! Error: $e");
}
You didn't specify a dn/path nor did you enter a path for the admin
This is how it normally looks
Search host: 12.14.4.38
basedn: "ou=Users,dc=DRiski,dc=com" <- I use your username as an example
admin:"cn=admin,ou=admins,dc=DRiski,dc=com"
password: just the regular password
What is with the weird cn, dc, ou stuff... that is like a path/folder in wich it needs to look to find the user (or users/groups in the case of base dn)...
base dn: specifies where to look for the users, in this case: in the folder users, on the server Driski.com
That is also how you specify your admin (tell the server where to find the thing).
Solved?
If not, try connecting to your ldap using ldapadmin (or another administrative tool) such that you can see how it works, and what path to enter...

GitLab set up to send invite Email to new members

I'm new to setting up Gitlab.
I have used the VSHN puppet module to install Gitlab in AWS.
The Gitlab server is running fine but the email invite is not working for anyone.
I have used the following configuration in site.pp file.
node 'client-ip-address' {
class { 'gitlab':
external_url => 'http://client-ip-address',
}
}
Could anyone please tell me what configuration is required to set up email notification?
Depending on your method of email, it will be configured with the gitlab rails option configuration documented here: https://github.com/vshn/puppet-gitlab/blob/master/README.md#usage
Documentation on examples for various email providers here: https://docs.gitlab.com/omnibus/settings/smtp.html#example-configuration
For example, the most basic one:
class { 'gitlab':
external_url => 'http://gitlab.mydomain.tld',
gitlab_rails => {
'smtp_enable' => true,
},
}
For gmail:
class { 'gitlab':
external_url => 'http://gitlab.mydomain.tld',
gitlab_rails => {
'smtp_address' => "smtp.gmail.com"
'smtp_port' => 587
'smtp_user_name' => "my.email#gmail.com"
'smtp_password' => "my-gmail-password"
'smtp_domain' => "smtp.gmail.com"
'smtp_authentication' => "login"
'smtp_enable_starttls_auto' => true
'smtp_tls' => false
'smtp_openssl_verify_mode' => 'peer'
},
}

Resources