Ansible Automation Hub LDAP authentication/login - ldap

I'm using Ansible Automation Platform 2.2.1 and managed to configure LDAP for Automation Controller (on server A) so that one can sign in using AD credentials.
I'd like to do the same for Automation Hub on a different server (server B).
In my inventory file on Automation Controller server (A) I set the values for Automation Hub analogous to Automation Controller eg. automationhub_authentication_backend, automationhub_ldap_server_uri etc.
But I don't see any LDAP connection attempts neither on server A nor on server B when I try to signin on Automation Hub.
With the local admin user login to Automation Hub works.
What am I missing?
Where is the log file for Automation Hub stored?

The log is stored in /var/log/messages
The LDAP settings should be set in /etc/pulp/settings.py and the webserver has to be restarted to take the new value.
In my case I had to set the variable from
AUTH_LDAP_GROUP_TYPE_CLASS = 'django_auth_ldap.config:GroupOfNamesType'
to
AUTH_LDAP_GROUP_TYPE_CLASS = 'django_auth_ldap.config:ActiveDirectoryGroupType'
to get login with AD credentials working.

Related

What are the credentials for Neo4j browser

I have just installed neo4j desktop and also the server from here.
Also installed JDK.
Next I had extracted the neo4j community and then using the admin command prompt inside the bin directory at that location I had installed the service using the command
neo4j.bat install-service.
Once the services are successfully installed, I am now able to browse to http://localhost:7474/browser/
But now what? What should be the credentials to logon.
I see the following messages
Database access not available. Please use :server connect to establish connection. There's a graph waiting for you.
Connect to Neo4j
Database access requires an authenticated connection.
Default credentials are
Username: neo4j
Password: neo4j

Running Selenium Tests from a VSTS Hosted Agent

I am running the Selenium test in Visual Studio Team Services with VS2017 hosted agents, but I think I am having issue's with company's proxy.
I am running the Selenium test from Visual Studio 2015, it runs very fine and able to access the web application.
When I am running the same Selenium test in VSTS using hosted agents, then it is failing on the below error and not able to reach the URL of the application to be tested:
"The site can't be reached"
I know there are proxy authentication required in my company but I am not sure how to run the Selenium test from VSTS hosted agent which can bypass the proxy.
If someone know the answer, please respond
The hosted agent is run by Microsoft and exists in Azure. It does not have connectivity to your internal network where your site is hosted.
You will need to set up a private agent that exists within your local network. A proxy can be configured for a private agent during setup with the following command line: ./config.cmd --proxyurl http://127.0.0.1:8888 --proxyusername "1" --proxypassword "1"
Ref: https://learn.microsoft.com/en-us/vsts/pipelines/agents/proxy?view=vsts&tabs=windows
We have several groups of agents hosted internally that can access stuff hosted on premise. We configured the agents using PAT's by clicking on user profile > security and generating a new PAT.

Run a command as remote user ID in a web server

I have a web application running on Tomcat7 and apache Httpd server. I have a use case to run a command as remote or client user on the web server whose user account is different from remote user accounts. Currently I am handing this requirement by running web server as root user and allowing root user to sudo as remote user for executing the commands on server side.
Please let me know if you have any better and secure ways to handle this.
Thanks.

Ldap Authentication for Windows Standalone Servers Using Novell eDirectory

I have an LDAP server Novell eDirectory in my Environment through which has the user data. In my Environment i have set of Windows and Linux servers. I need to use this LDAP As the Authentication Source for for both the servers.
For Linux i need to achieve this by setting the linux as LDAP Client & extended edirectory schema for linux users and users are able to login into the machine and even able to create the home directories for the user. But the problem comes with the windows machines.
For windows machines i have used novell gina which authenticates the user using LDAP but it also requires a local or domain user credentials to login into the local system.Then for every user i have to create a local user on every system which is off target of purpose.
Then i have used pgina (Another Open Source Gina) through which i can authenticate the user using LDAP and it creates a profile for the user. Fine but it is also creating a local user with the LDAP username.If any admin changes password on the local machine for this user then the password of both the LDAP and local user will not be in sync.
How can i get the login behavoiur of active directory where it will authenticate against active directory (Think AD as LDAP) and creates a profile for you in the local system but never creates a local user.Anybody can throw some light on this to solve the issue?
Thanks and Regards,
Sunny.
I guess you are using Open Enterprise server. If you are on OES linux, probably you can use Domain Services for Windows This can help achieve what you want. You will not even need a gina login. Its a Domain emulator. So, there wont be any ldap login. It would be a kerberos login. Your eDirectory (and other related services) work exactly like AD domain. But nothing stops you to use the plain ldap login against eDirectory. You can continue to use the linux login as its now. If you are using gdm (gnome display manager) on linux it can do a domain login like the windows.

Exception when deploying to IIS: Login failed for user 'IIS APPPOOL\DefaultAppPool'

I'm working through some WCF examples in "Windows Communication Foundation 4 Step By Step". My resulting application runs fine as long as the service is hosted in casini. It fails when I deploy the service to local IIS. When deployed to IIS, I can browse to the svc page in IE. That works.
According to the book, page 41, the app pool account needs to be a member of the db_owner role in my database. The author suggests, after verifying the correct address of the service (already did that), checking the permissions of the app pool account.
How do I verify which account is used by the application pool hosting my WCF service? Currently using the default app pool and IIS APPPOOL\DefaultAppPool is in the db_owner role. IIS APPPOOL\ASP.NET v4.0 is also in the db_owner role.
The exception is...
System.Data.SqlClient.SqlException: Login failed for user 'IIS APPPOOL\DefaultAppPool'.
How do I troubleshoot this issue? Thanks!
Solution found here:
Open IIS
double click your PC name under Connections
Click Application Pools
Select your app pool (DefaultAppPool)
Then under actions on the right click Advanced Settings,
Go to Process Model section and
click on Identity.
Now select NetworkService.
I had the same problem. Issue was that I had "IntegratedSecurity=True;" in my connection string but I was using sql authentication and passing in credentials at the same time. I removed the IntegratedSecurity piece and everything worked.
First thing you need to clear if you are using windows authentication and you are not mentioning any username password in your connection string then:
What happens when you run your code through localhost:
when you run your wcf test client from localhost, it will be able to communicate to database as local debug mode application is calling database by your account's service. So it has access to database because devenv.exe is running under your user account.
But when you deploy your web service in IIS. Now understand this service runs under IIS not under your account. So you need to assign access rights to IIS service to access the sql server for windows authentication.
Here your web service would not be able to communicate to the SQL server because of access rights issue.
So if you are using windows authentication to connect your database, you just have to change the IIS Application pool settings.
You need to change IIS Application pool's identity to local System.
Below are the Steps for windows authentication WCF:
•Open IIS (windows+R (run) then type inetmgr, then click ok)
•double click your PC name under Connections
•Click Application Pools
•Select your app pool (DefaultAppPool)
•Then under actions on the right click Advanced Settings:
•Go to Process Model section and
•click on Identity.
•Now select LocalSystem.
Now open your sql server management studio:
open run-> then type ssms then press ok
in ssms, login using your windows authentication account.
open security tab
expand logins tab
then you will be able to view your account.
Now open properties of your account
go to userMapping
then select the database you want to connect
then check the role membership services you want to use for the selected database
click ok.
add Trusted_Connection=True; property in your connection string.
Save it & deploy the web service.
Restart app pool.
you will be able to connect the database now.
if not exists
(select * from sys.server_principals where name='IIS APPPOOL\DefaultAppPool')
create login [IIS APPPOOL\DefaultAppPool] from windows;