Is it possible to track changes in functions or store procedure in postgresql database?

I have a lot of store procedure and functions that are constantly updated … is there any way to track those changes from a Database mounted in postgresql?

design – Parent-child relationship of double track in Django

I am creating an application to register and update the information of children, this information must be provided by their tutors. Each child can have multiple tutors, and a tutor can be a tutor for several children. This has been resolved by specifying a Table where I relate a student to each of their tutors through a single record and characterize that relationship accordingly.

Now, we face the need to specify read / write permissions among some of the tutors who give private lessons to a student. My idea is to create a new table where you relate each of the pairs formed by those tutors and specify the read and write permissions. The problem is that those permissions are not reciprocal, one tutor may have permissions on another, while that other may not have permissions on the first.

I don't know which one is better, have only one record for each pair of tutors and add Boolean fields for each type of permission possible, or define a type of parent-child record where parents have permissions on the child. This second option would mean having two records for each pair of guardians, where the tutor 1 is a parent over the guardian 2 and another where the tutor 2 is a parent over the guardian 1.

Please help me determine which would be better and why.

Security: Track the source of Active Directory user locks

Suddenly, many users of this organization's systems began to report that they had been blocked from their Active Directory accounts.

The entire network is physical and local. There is no direct internet access. There is a firewall that connects the local network through VPN to a larger corporate network. Here are the components of the local network:

  • NY: Active Directory domain.
  • server1: Windows Server 2008 R2; Active Directory domain controller for NY; Remote desktop license server; HyperV VM Host; Only administrators can connect.
  • server2: Windows Server 2008 R2; Remote desktop session host; member of NY; Users connect to this machine regularly to work on documents.
  • NL: Windows Xp; VM running on HyperV hosted on server1; member of NY; used only by a few selected users (maybe 3) at regular times every week.
  • Several other Windows XP virtual machines that run on server1 They generally run background services and are generally not connected to the use of Remote Desktop.
  • Several HP thin client machines used for remote desktop connection to the above.

I started looking at the event log server1 (the domain controller). I filtered the event 4740 "A user account was blocked" and discovered that this event occurred once every 2 or 3 minutes:

Frequent account locks

Each occurrence of the event looks like this:

A user account was locked out.

    Security ID:        SYSTEM
    Account Name:       SERVER1$
    Account Domain:     NY
    Logon ID:       0x3e7

Account That Was Locked Out:
    Security ID:        NYJoeSmith
    Account Name:       JoeSmith

Additional Information:
    Caller Computer Name:   NL

Each occurrence has a different Active Directory username, but the rest is the same in all cases.

This is an immediate warning signal for me, since the frequency and repetition of the locks seem to suggest that someone or something is running a list of usernames and trying to guess the passwords until those users are locked.

I notice that each of the events contains the line Caller Computer Name: NL, Microsoft documentation for 4740 says it contains:

the name of the computer account from which the login attempt was received and after which the destination account was blocked.

As far as I can tell, this means that someone or something is trying to log in to NL using NY credentials, or that something in the NL the machine is trying to authenticate using NY credentials.

To try to find the source, I enabled the following audit policies in "Local security policies" in NL:

Recently enabled security audit policies

I was hoping to find some login attempts at the NL event logs, but I didn't find anything that matched the blocking events found in server1. While server1 keep recording a new lock every 2 to 3 minutes, the NL Security logs only show 4 or 5 events in total every hour.

As a temporary solution, we begin to maintain NL VM off when not in use, and locks stop while the machine is offline. This has been going on for several weeks now.

What other tools can I use, or what other records can I search / enable to locate the source of these login attempts that result in account locks?

IP address: how is it that the media cannot track that I have read 5 blogs this month when I browse incognito?

There are two ways in which the medium can track a user

IP adress

We will concentrate mainly on tracking based on the IP address. What I found was even if I read 5 articles this month. If I open the medium in an incognito window, I can see the content of the blog.

We also know that incognito browsing does not hide our IP address, it is "no VPN". So my question is how can the media not track me, when I use incognito and allows me to see the blog?

c # – Should developers do things that defeat strong typing, eliminate intellisense and make it difficult to track other developers?

Just to clarify: this is not a complaint. I have a genuine curiosity and our direct curiosity is a genuine question. I want to become a better developer and even small details like this count.

So, don't get me wrong, this is not a technical question about what Dictionary make. It's about when to use it as a developer on a computer.

The reason for this is something that happened today at work. I started working on a project made by another developer. He is still on the team, so I can ask for information, etc. BUT:

He uses dictionaries in C # for EVERYTHING. We make payments and he receives a known response from a payment gateway API.

The fields are known, so if it were me, I would make an entity / model as I want to call it and then assign the values ​​there and then save them in the database (that was the short story). Keep in mind that these are data that we need to save, but only for historical reasons. We are not really doing any operation about it.

It is a great entity (as in many fields). So I tried to work on the project and, of course, it was impossible to get intelligence about it. I needed a single key to return the value to the interface. Of course, I couldn't find it. I wasn't in any part of the projects (we have a monolith).

I had to spend about half an hour reviewing projects, commitments, history, then the database and then ended up asking him what happened to him, because I couldn't find it.

It was something really simple like object.VariableInObject.Data("theKeyIwantFromTheDb") but actually looking for it was a nightmare. I got frustrated but asked a very polite question about & # 39; Why do you use dictionaries so much? Especially if the data is known.

His response was "because I don't think we should use objects for data that we will keep only for historical reasons" (that is, in this case, a person's payment history ").

I don't know if that is valid. It is? Because it was a nightmare to track the data in a great solution that I hadn't worked on before. If I were in the project and not in a dictionary, I would have found it immediately.

So, the question is in the title. Intelligent development in a team, when other people use your solution and need to work on it, should I use something like that, which is difficult to track?

I ask because I personally try to make it easier for other developers and it seems that he has experience (senior while I'm in the middle) and just doesn't give a … you know. He simply does what he likes (at least that's what it seems).

PS If that plays a role, the db is Nosql.

Privacy – Can my oppressive government track my activity on Twitter and detect me?

I live in Iran and I want to be active on Twitter against our oppressive government. Can my government track and detect me?

Twitter is prohibited here and we must use VPN. I use Outline (Shadowsocks) mainly. Is there any way to track users through information from ISPs or something? If using Outline is not a good option, is TOR using a good solution?

The importance of this question is that I can be sentenced to death only by a Twitter post! I do not want to be tracked. I delete the metadata from the images I publish and do some basic methods, but I want to make sure there is no problem with my activity on Twitter. What I have to do?

How to track AMP data in Google Analytics?

Google Analytics (GA) has started showing wrt analysis data to canonical URLs now. Previously it was easy to find data from AMP pages in GA, since one can easily filter the URLs ending in "/ amp". But now finding AMP data in GA doesn't seem easy.

The dimension & # 39; Source & # 39; of the AMP pages is like & # 39; & # 39 ;, so it can be used to filter AMP data (i.e., GA> Acquisition> References> Dimension & # 39; Source & # 39 ; O Behavior> Site content> Landing pages> Primary or secondary dimension such as & # 39; & # 39;) but for me, this data is not consistent with the AMP data I get from Google Search Console.

Custom dimensions can be used to identify AMP sessions, but is there any other way to accurately track AMP data without using the custom dimension? Thank you.

privacy – software development impossible to track

My goal is to develop software that is illegal in my country. Obviously I don't want anyone to track the code to me or prove that I developed it after implementation.
What precautions would be necessary? What traps should be avoided? Is there a tutorial?

I suspect that full disk encryption is required on your development machine and Internet connectivity through Tor.

What configuration would be necessary when developing in countries with political repression or similar conditions?

tls: can you track traffic to the IP address from outside your network?

I'm not sure what it's called or even if it's possible, but here is the scenario I'm curious about:

I connect to a site that do not use SSL / TLS to do some work (unfortunately I must use this site and I have already told the owners to fix it).

My question is simply if someone (and if so, how) can track traffic to that site from a network that is not mine.

For example, I log in from my work PC, which is presumably in a secure network (that is, nobody is physically in the parking lot doing a MitM attack) but someone can do not In my work network, I simply smell the traffic to the http site itself and simply intercept the POST request there, regardless of where I am.

To clarify, I'm looking to know if it's possible without using & # 39; hacks & # 39 ;, but something like tcpdump. So, for example, I know that if an attacker has compromised the web server or my work PC, they can smell my traffic easily, but at that time, they will no longer be out of my network.

Here is a picture I take.

enter the description of the image here