How to change users.xml from being readonly? - clickhouse

I've set up a working instance of a ClickHouse server with docker-compose. Right now I'm trying to grant privileges (write permission) to a user who is defined in users.xml as such:
<users>
<deep>
<access_management>1</access_management>
<password>xxx</password>
<networks incl="networks" replace="replace">
<ip>::/1</ip>
<ip>192.168.65.155</ip>
</networks>
<profile>default</profile>
<quota>default</quota>
</deep>
</users>
I'm using this command
GRANT INSERT ON registry.simple_people TO deep
which gives me this error message:
Code: 495, e.displayText() = DB::Exception: Cannot update user `deep` in users.xml because this storage is readonly: Couldn't update user `deep`. Successfully updated: none (version 20.12.3.3 (official build))
I've read the docs from ch here https://clickhouse.tech/docs/en/sql-reference/statements/grant/ and also I've been setting the readonly option to 2 and 0 without any difference in the output. Can anyone of you see where I could've missed something or what I ought to do to be able to make users.xml "not-readonly"?
Note:
The user 'deep' can read from the DB.
I'm on WSL: Ubuntu-20.04

Most probably you are executing inserts using HTTP GET instead of POST.
https://clickhouse.tech/docs/en/interfaces/http/#http-interface
When using the GET method, ‘readonly’ is set. In other words, for queries that modify data, you can only use the POST method. You can send the query itself either in the POST body or in the URL parameter.
There are two ways to manage users.
The old XML-way and the new create/grant/RBAC.
XML created users cannot be granted. They are managed using XML settings.
By DEFAULT XML users have full access to EVERYTHING.
You can set READONLY using XML + profile and set this profile to the XML user.
<profiles>
<roprofile>
<readonly>1</readonly>

Related

How to delete a Collection Type?

I created a collection type in the Strapi admin panel and now I want to delete it, but I don't see an option anywhere in the admin panel to do so. I must be missing something obvious, right?
You can do it in Content Type Builder, steps:
Enter Admin panel
Content Type Builder
Click a collection type
Edit (small pen icon next to the name)
Delete
Confirm
Official docs - Deleting content-types
Another way is to use the admin API, make a DELETE call to:
/content-type-builder/content-types/:uid
To use the API you must have permissions enabled for a role under Roles & Permissions
Endpoints docs
At the time of this update Strapi added a caution (Feb 2022):
Deleting a content-type only deletes what was created and available from the Content-type Builder ... All the data ... is however kept in the database.
You need to start the server with npm run develop or yarn run develop
If you started the server with npm run start or yarn run start you will not see these options.

coturn cannot find credentials of user

I was trying to deploy a simple TURN server using coturn.
When I test it on Trickle ICE (turn:rtc.jackxujh.me:3478 [webrtc:mighty]), Trickle ICE says "Authentication failed?".
The coturn server keeps reporting this error:
ERROR: check_stun_auth: Cannot find credentials of user
Here is the complete turnserver.conf I am using (by uncommenting lines of the coturn sample conf):
external-ip=39.108.74.114/XXX.XXX.XXX.XXX #(XXX is internal IP)
fingerprint
lt-cred-mech
use-auth-secret
static-auth-secret=XXXXXXXX... #(XXX is the secret)
realm=rtc.jackxujh.me
user=webrtc:0xXXXXXXXX... #(XXX is the key)
cert=/etc/letsencrypt/live/rtc.jackxujh.me/cert.pem
pkey=/etc/letsencrypt/live/rtc.jackxujh.me/privkey.pem
mobility
I find a related discussion on GitHub, but I don't feel there is a solution at the end.
In fact, I am confused whether my conf file is using TURN REST API or not.
Meanwhile, I tried to check if there was a user named webrtc in turndb, by using # turnadmin -l, but the output was nothing. (Is this command correct?)
In fact, I am confused whether my conf file is using TURN REST API or not.
I can confirm You use REST API because use-auth-secret is set
use-auth-secret
So you need to use a unixtimestamp as username, and the hashed password..
user=timestamp:userid
password=base64(hmac(secret key, user)
Read more about the difference of Long-Term-Credential and REST:
https://www.ietf.org/proceedings/87/slides/slides-87-behave-10.pdf
If you want to use normal username/password use the long-term-credential so remove use-auth-secret
and set it statically or in db
user=username1:key1
turnadmin
turnadmin -l
list static and db users.
So in case of REST is correct the empty list.

SonarQube API: Retrieving a list of users assigned to a project permission?

I'm trying to find a list of users for a specific project (by projectKey) who possess the issueadmin permission. I've found a documented API that gets me pretty close:
api/permissions/search_project_permissions
but the response that I get back only has summary information: counts of groups/users for each permission type.
search_project_permissions response
Does anybody know if there's a way to get to the login details for the users?
There is an "internal" web service (meaning it could change without notice!) that does this. You'll use it like so:
http://myserver.myco.com/api/permissions/users?projectId=[project guid]&permission=issueadmin
In Web API interface use the "Show Internal API" checkbox at the top of the left column to see it.
just noticed in Sonarqube v6.7 it works as follows:
https://sonarqube.dhl.com/api/permissions/users?projectKey=<KEY>
https://sonarqube.dhl.com/api/permissions/users?projectKey=<KEY>&permission=issueadmin
https://sonarqube.dhl.com/api/permissions/users?projectKey=<KEY>&permission=issueadmin&permission=scan
All possible permissions are (reg. Browse, See Source Code, Administer Issues, Administer and Execute Analysis):
admin
codeviewer
issueadmin
scan
user

How to remove SSRS credentials in Visual Studio 2008

I have a question similar to this one, but I am using VS 2008 and an Oracle database (with Oracle SQL Developer). How do I get rid of the report credentials in VS? Thank you.
One of the easiest ways to get rid of this is to supply a username and password for the database in question on the reporting server. The URL is usually something like http://localhost/reports. Usually, users created for this type of connection have minimal read-only rights needed for the specific report. The disadvantages to this type of connection is that it's a one-user-fits-all situation. But because of the error message you are getting, it appears that your wish is to supply a specific user name and password rather than use Windows security--which is just fine.
To get here, click Security from the report drop-down list on the main page. Then, click the Credentials stored securely on the report server. Then, here's an issue that get's lots of folks--click the Apply button at the bottom to save the changes. Sometimes the Apply button is not visible and you need to scroll down to click it.
Now, if you're accessing your report through ReportViewer in VS then the following link may provide some help:
http://www.sql-server-performance.com/2012/accessing-ssrs-reports-report-viewer-web-page/
Alternately, you can create or add to a web.config file:
https://msdn.microsoft.com/en-us/library/microsoft.reporting.webforms.ireportservercredentials.aspx
p.s. based on our chat, try adding the following to your web.config connection string--if you have one(with the respective user name and password)--if, indeed you're using Oracle's ODP.net:
providerName="Oracle.ManagedDataAccess.Client" connectionString="User Id=oracle_user;Password=oracle_user_password
http://www.oracle.com/technetwork/topics/dotnet/downloads/odpnet-managed-nuget-121021-2405792.txt
I have not figure out how to solve this from the database. What I did was, comment out this line of code from the XML of the report:
<Prompt>Specify a user name and password for data source XXX</Prompt>
If you have the correct credential info in the <value> tag, your report should be loaded with username and password parameters without problems.

custom Membership fields disappearing?

I have added a custom profile field named 'Relatiecode' to my user profile according to the SDN developer guide. I have entered a value via the sitecore User Manager. More specifically, I set it to '0000008' for the user extranet\coordinator8, and 0000001 for the user extranet\coordinator1, like this:
I have verified that this is also stored in the sql database
however, when I attempt to access the data in my asp.Net webform (sublayout, actually), the field appears to be empty for user 'coordinator8'. What really confuses me is that it seems to be working perfectly for user 'coordinator1'. See below:
I'm at a loss! What am I doing wrong? Thoughts?
sitecore version 6.5
Not the solution, but because of deadlines I decided to go with a makeshift solution... we're storing the fields in a custom SQL database now, and querying it with NHibernate.

Resources