BlogEngine Integration Problem - blogengine.net

I have a running application in which client wants to implement BlogEngine, I have done almost but in the existing application there are also a registration, so now i want that when a user registration at my application that particular user be able to login in blogEngine.
I am using sql database and set all the settings in web.config.

Abhisheks, It sounds like you want to use the same user system as your existing web application. What you need to do is configure your authentication provider for BE.net to use the same user system as your existing app. You can either roll your own provider via code, or if your existing app is using the standard .net auth provider, then you should be able to just piggy-back off of that by configuring BE to use that via your web.config file.

Related

Configure as code with security groups and ldap

We are trying to set up a SonarQube server (v. 6.5) to run in Kubernetes. Because of this, we need everything to be configured "as code" not through the web interface.
We have successfully set up single sign-on (SSO) against LDAP server, and that works as such. But since users can then not log out in order to log in as a static admin, we need some way to configure a group that has admin privileges.
It is my understanding that this should be done via group mapping, but all documentation and examples I can find only suggest setting up the groups through the UI.
Is there some way to configure groups via sonar.properties (or other properties file) that are then automatically mapped against groups from LDAP, and configure a group to get admin rights?
I am pretty new to SonarQube (and no ldap expert either), so I hope the question makes sense.
There is no way to configure groups through properties. There are web services (which are used by the UI itself) with which you could script this.
Alternately, see if you can turn on group synching with your SSO. Then you just have to grant admin rights (via the UI? via web services?) to the appropriate group in SonarQube.

Setup Spring app on the deploy

Is this a good practice to use CommandLineRunner to setup app on the first deploy. For example, I want to:
Create user's roles in the DB;
Load admin's login and pass from property file and create admin-user (on user per app) in the DB.
Or can you advise a better variant for me?
I would not recommend doing it that way. Database setup, as well as future migrations, are handled nicely with either Flyway or Liquibase.

How To Hide web.config appsetting params while using GIT and WebDeploy publish

I'm struggling with finding a good way not to check my secret passwords into my web.config.production type files (the ones that get transformed when Web Deploy publish is done). my workflow is that my team checks in and out of github and then when we are ready to do a production deployment, we have a custom web.config.deployment configuration that has all our real passwords in it. The problem is that all developers see those passwords.
I'm looking for suggestions for how to not have to put those passwords into our github repository with as a little friction as possible. That is, now, we have to rdp into our web server and manually change those passwords. Azure let's you set them in the azure portal, but we are not using azure.
One option is to store these app settings\connection strings in IIS. Then they will be applied to the web.config at start up and only members with access to your IIS administration can access them.
See these post:
http://forum.winhost.com/threads/setup-the-connection-string-in-web-config.7592/
http://technet.microsoft.com/en-us/library/cc753224(v=ws.10).aspx
app settings – Specify name/value pairs that will be loaded by your web application on start up. For .NET sites, these settings will be injected into your .NET configuration AppSettings at runtime, overriding existing settings.
connection strings – View connection strings for linked resources. For .NET sites, these connection strings will be injected into your .NET configuration connectionStrings settings at runtime, overriding existing entries where the key equals the linked database name.

Simultaneous db4o file access

How can I simultaneously access my .db4o database from the Visual Studio's Object Manager Enterprise (OME) db4o plugin and from my application?
I'm starting out with db4o, integrating it with an ASP.NET MVC application. I have a two-layer repository access pattern set up using StructureMap for IoC and I keep getting DatabaseFileLockedException erros in VS when debugging while using OME.
When you want to access a db4o database file from multiple applications at the same time, you need the client-server-mode. So, either your application or a special "db-server only" application has to open the file as server, then both your application and the OME should be able to connect to this server.
The documentation has an example for this.
I never used OME, so I have no idea how to configure it there.

Create new user in sonar

Is it possible to create a new user in sonar without using the web interface?
I need to write a script that inserts the same users for some tools, including sonar.
There are three ways you can do this:
Write directly to the database (there is a simple table called users).
Use the LDAP plugin, if you specify sonar.authenticator.createUsers: true in sonar.properties, it will create the users in the sonar database automatically the first time they authenticate.
Write a java application that depends on the sonar plugin API, you can then use constructor injection to get a Sonar hibernate session and persist the user you want. See Here.
Since SonarQube version 3.6, there is support for user management in webservice API:
https://sonarqube.com/web_api/api/users
http://docs.sonarqube.org/display/DEV/Web+API
The web service API does not seem to support user management. Anything's possible, but it doesn't look like this is offered directly via Sonar.
You could probably use some web automation library (webbrowser, webunit, watir, twill) to do it through the running server; it might even be possible to just use something like 'curl' by looking carefully at the page source for the users/create form.
Or, if you want to go straight to the database, you could try to pull out the user creation functionality from the code and mess with the sonar.users table directly.
There is the LDAP Plugin, which would take care of authentication, but it still requires you to create the users in Sonar, so that wouldn't solve your problem.

Resources