Entry tags:
Odo's morality
I was talking with
weaver0fwords about why it is that Odo never acknowledges Quark's more good deeds, like the food/supply smuggling he did for Bajorans during Terok Nor, or why Odo, someone who is concerned more with justice than law, strongly disapproves when (for example) Quark arms the Maquis and similar groups. It's very likely (given Odo's close monitoring of Quark) that Odo knew about Quark's smuggling during the occupation and yet he never mentions or acknowledges it at any point in the show, and when you do have Odo finding out about Quark's illegal activities that seem to be for a good cause, he's usually annoyed/disapproving in a way that indicates that he still very much has a low opinion of Quark. This got me thinking about how I think Quark's morality has been very influential on Odo and that Odo and Quark have a kind of symbiotic relationship when it comes to moral action. There's less evidence of it in canon, but I also think Kira had a similar influence on Odo's morality. Both Quark and Kira through their contrast with Odo's values help define for Odo what he is willing and not willing to do.
This is one of my favorite topics so I decided to expound a bit more on what I think Odo's morality is as depicted in the show, and how I think Quark and Kira shaped that morality.
Just a note before going into my thoughts about Odo's moral compass: One of the things that is difficult about putting together a coherent picture of Odo's morality is that (1) the show is inconsistent and contradictory in its depiction of Odo's morality, and (2) the show also, I think, makes missteps in its depiction of Odo's morality. Both of these things result in, at best, unexplained puzzles that the viewer must solve by filling in details or, at worst, plot holes that require the viewer to throw away or mentally rewrite bits of canon in order to come up with a better/more realistic/more consistent depiction of Odo.
What I mean by (1) is that Quark and Odo's relationship is kind of infamously incoherent and open to multiple reads about what is going on between them. Because Quark's morality departs so far from Odo's stated morality, Odo's relationship and attitude toward Quark (which can range in interpretation from plain and simple hatred/contempt to having a crush on or being in a relationship with Quark the whole time) does have ramifications on what Odo's morality (in practice) is. Without being able to piece together a consistent read of Odo and Quark's relationship, it is hard to decide on what Odo's morality is in fact meant to be.
What I mean by (2) is that I think the writers intended Odo to be overall a "good"-aligned character and a character you can recognize as being morally upright and a good/moralistic person, although one that has shades of grey and less savory aspects to his character and one that (like MANY ST:DS9 characters) is thoroughly morally compromised. However, I think the writers miscalibrated their moral scale slightly when it comes to Odo. I think ST:DS9 puts a bit too much weight on Odo's moral virtue stemming from the fact that he is a "neutral" "impartial" outsider observing humanoid conflict and legal systems and stringently applying that neutrality in a way to improve them. To modern audiences, though, even someone who actually IS perfectly neutral and impartial and unbiased (and not simply claiming to be such) in a system as skewed as the Cardassian occupation of Bajor is prrrobably doing much more to prop up that system and launder its obvious injustices into a misleading veneer of respectability than they are making anything better. As such, I think Odo comes out of the occupation looking much worse than what was the writers' intent. For example, I think 5x08 "Things Past" is an interesting episode but is badly calibrated. From everything we know about Odo, he probably has plenty to feel bad about even if he carried out justice (as he felt it) perfectly aboard Terok Nor. You can complicate his character quite a lot just by showing him to be a good and competent cop/chief of security aboard Terok Nor; instead the writers choose to depict Odo's "failings" aboard Terok Nor as stemming from sloppy detective work where he fails to find the real culprits of a crime and instead condemns innocent people to execution. In my mind, this is my mental model of what I think the writers intended with that episode and why I think it failed to accomplish its goals:

I think the writers thought they were writing a character who, through his strong sense of justice but position within Dukat's colonial government was complicated but generally seen as a good/friendly presence on Terok Nor by Bajorans. Adding nuance to his character would therefore mean depicting him falling short of people's image of him. However, to a more modern audience, even when doing his job perfectly, Odo is already quite a morally-compromised character. In order to make it believable that Bajorans respect and trust him, he must have been doing something else outside the chief of security role that they felt was helpful and beneficial. But we barely see evidence of this in the show aside from Odo withholding information once in order to protect Kira (implicitly "picking a side," as she puts it, in the Cardassian-Bajoran conflict). In order to add nuance to his character and also make his character comprehensible, the show actually needs to go the opposite direction -- show us more of Odo doing things that would have gotten him in Bajorans' good books, show us that what he did for Kira was part of a larger consistent pattern he engaged in during his time at Terok Nor, not a one-off thing, and certainly not reveal things that make his character during the occupation look even worse than it already is. While the show does plenty to indicate it understands that Odo's position at Terok Nor was not morally clear-cut -- the show clearly depicts Odo as Not a Good Person and shows that many people actually do view him as a collaborator -- it is ultimately very hard to square facts like (a) Odo being chief of security on Terok Nor and coming out of the occupation still able to occupy that position on DS9, and (b) Kira having such a close and trusting friendship with him from the very start of the series, with Odo's personality and his actions on Terok Nor. So this is what I mean when I say that the writers made some missteps in Odo's depiction. I think how Odo is actually depicted in terms of his morality comes apart significantly from what the writers thought they were depicting, and so I have to kind of choose between interpreting Odo's character based on what is actually there in the show vs. interpreting it based on what I think was the underlying intention re: his character.
Okay, with those preliminary caveats out of the way, let's get into the main argument I want to make, which is that, despite all the issues mentioned above, the way that I read Odo is that Odo relies heavily on Quark's moral compass to do two things for Odo: (1) to calibrate Odo's own moral code (Quark as a moral teacher for Odo), and (2) to allow Odo to indirectly express parts of his morality that he is too squeamish to engage in himself (Quark as a proxy/symbiotic moral agent that complements Odo's stated morality). While Odo never verbally acknowledges that Quark is (in some ways) a good person or that Odo morally approves of some of his sketchier actions, I think it is somewhat implied by the fact that Quark is still at Terok Nor/DS9 that, all-in-all, Quark remains in Odo's "good books" despite how much Odo attests that he's going to arrest Quark (you know... any day now...) and how hostile he is toward Quark. I also think Odo's relationship with Kira is much the same, where Kira, like Quark, challenges Odo's morality and causes him to have to rethink his moral positions, and also that Kira too is a proxy/symbiotic moral agent that allows Odo to indirectly "act" in ways he normally could not.
First off, let me just collect some things from canon that I think establish the basic contours of Odo's morality:
1. Odo has a strong sense of justice / is a moralistic person / believes himself to be a force of justice in the world. Whether or not he actually has this effect at any time is highly debatable, but I think we can assume that Odo at least believes himself to have a strong grasp of the good and to be consciously and constantly striving to take action in service of that notion of The Good.
From 2x08 "Necessary Evil":
From 2x18 "Profit and Loss":
Some examples of Odo viewing justice to be core to his motivation/personality.
From 3x02 "The Search, part II":
Justice vs. order is a frequent recurring theme/dilemma in Odo's storylines and is where he comes apart from his Changeling brethren. Odo frequently rejects the project of the Founders as being immoral and separates himself from them (morally and physically) and even works to undermine their efforts.
From 3x07 "Civil Defense":
This is Quark's evaluation of Odo and is treated as something kind and reassuring to say, something that Odo would be pleased to have someone say about him (of course, Quark tempers the praise with insults at the end). Honor and integrity are clearly important to Odo.
In addition, we frequently see Odo contemptuous of other people's moral failings. Quark is one frequent target of Odo's contempt but he also shows contempt for other individuals throughout the series. He's just generally a very judgy/moralistic person and I think this helps establish him as someone primarily motivated by justice.
2. Odo has a complicated relationship to law and regulations. On one hand, it's clear that Odo has a general preference for things to be orderly -- people complying with the rules and regulations he's set up on the station, people not breaking the law, people not disturbing the peace/ordinary day-to-day operations. However, on the other hand, he will frequently disregard laws and regulations he views to be irritating or illegitimate. Yet at the same time, he will often appeal to legal systems and laws in order to discipline bad actors and constrain the ability of people to act badly.
From 2x22 "The Wire":
An example of Odo blatantly and intentionally disregarding local laws to maintain station security. See also the above actions regarding the Cardassian dissidents in 2x18 "Profit and Loss," where Odo cooperates with Quark to use an illegal cloaking device to smuggle Natima and co. off the station in direct violation of an agreement between the Bajoran AND Cardassian governments, upheld by the Federation, to hand Natima over to Cardassia.
From 2x20 "The Maquis, part I":
By contrast, this is an example of Odo complaining about how his actions are limited by local regulations. It's also an indication that, if Odo were in charge of setting policy and laws, his natural inclination/morality leans quite authoritarian, moreso than the Federation, and probably also Ferengi and Bajoran culture too (certainly more than Kira). Of course, the measures he lists here are indeed things he needs some amount of institutional support/buy-in/resources in order to accomplish. This maybe gives an important hint at Odo's morality which is that illegal actions, especially ones that can be executed on his own, surreptitiously and privately, he is perfectly willing to do.
From 4x16 "Bar Association":
Another example of Odo refusing to break local laws and orders even though it conflicts with his own personal preferences/moral system. Perhaps a bit complicated by the fact that thwarting Quark might be part of Odo's motivation here...
From 5x19 "In the Pale Moonlight":
Here, Odo appeals to the law as a way of thwarting Sisko, despite the fact that Odo can and does disregard the law when it suits him. Possibly the difference here is that this is a security incident, which Odo views as his intrinsic duty to investigate and pursue. It's also possible that Odo's recalcitrance comes from a suspicion of authority figures bending the rules to suit them, behavior that Odo might find it his duty to curtail and obstruct wherever possible. (On a shippy read, it's also possible Odo's stubbornness is related to the fact that Quark was hurt in the incident.)
It's kind of hard to piece together a coherent picture of Odo because of all this. The best I can do is to say that Odo has a somewhat bifurcated approach to moral and legal systems. If the moral/legal system is one that coheres with Odo's own morality (including systems he himself has designed), any amount of authoritarianism is justified in carrying out and enforcing that moral system. If the moral/legal system is one he disagrees with, though, it loses all form of legitimacy and Odo no longer feels like such rules apply to him. He is willing to take any action he views as just, if it can be carried out by himself in a fairly invisible manner.
3. Odo is at least somewhat critical of the Cardassian occupation. As far as I can tell, Odo doesn't frequently state what he thinks about the Cardassian occupation of Bajor. However, we do know that he was Terok Nor's final chief of security (1x04 "A Man Alone") -- as in, he stuck around the administration for several years and held a fairly significant position therein -- and that during 2x08 "Necessary Evil," he was quite blunt to Dukat about his low opinion of the Cardassian occupation:
It's a bit unclear whether Odo's opinion is that any sort of colonial situation is intrinsically unjust and illegitimate or whether he just disapproved of specific abuses present in the current regime. However, we can certainly say that, though Cardassian-aligned in his position and at times easily manipulated by Dukat into accomplishing Dukat's goals (2x08 "Necessary Evil"; 5x08 "Things Past"), Odo was clear-eyed about the cruel way in which Bajorans were treated during the occupation.
4. Odo is personally a pacifist who eschews deadly violence in his role as a security officer, but he has taken life indirectly by submitting suspected criminals to the death penalty.
It's established from the very beginning that Odo never uses phasers/weapons, nor does he allow such things on the Promenade (1x01 "Emissary"). This suggests a preference toward using non-lethal ways of dealing with security threats. This is reiterated in 3x26 "The Adversary" in foreshadowing before the first time Odo (unintentionally) takes a life:
However, people that Odo suspected were terrorists did get executed on Terok Nor and Odo mainly seems more upset about the fact that they were possibly innocent and less so about the fact that the punishment was death (5x08 "Things Past"), and a Cardassian points out in 7x21 "When It Rains..." that Odo, in his role as chief of security, handed Bajorans over to the Cardassian legal system, which we know at this point features elements like torture, show trials, and death penalties.
From 7x21 "When It Rains...":
Kira gets annoyed before Odo can answer, but anyway, it's clear that it's part of Odo's code that he doesn't kill, although this is a bit hard to square with the fact that he has taken actions that led to people being executed.
Here, I just want to review some facts about how Quark behaved when he was on Terok Nor, some of which comes fairly late in the series.
From 2x08 "Necessary Evil":
Here, it's clear that Quark regularly lied/gave cover stories for people in exchange for money. Also, this brief exchange between Quark and Dukat suggests that they had a very similar relationship that Quark and Sisko have during the show. Namely, Quark is repeatedly caught engaging in crimes, but Dukat, clearly believing that Quark's presence on the station is overall a positive/worth it, frequently looks the other way and protects Quark from the full consequences of his actions. One way you could read this exchange is that it is indicative of widespread Cardassian petty corruption, where you can get away with something illegal as long as you give the right people an appropriate bribe. Or you could read it similar to Sisko and Quark's relationship where Quark is allowed to get away with some illegal activity that interferes with station operations but he is usually given a minor slap-on-the-wrist punishment to indicate the administration Disapproves but then is allowed to continue with his business nonetheless. In any case, this indicates that some of Quark's antisocial/subversive activity on Terok Nor was done out in the open, basically, with permission from the administration.
From 2x18 "Profit and Loss":
This dialogue between Quark and Natima indicates that Quark smuggled food to Bajorans (something that could have resulted in the death penalty) and also used Natima's credentials to embezzle money from her employer. It also indicates that Natima originally thought that Quark's actions were done for noble reasons and was disappointed to find out that it was out of self-interested profit, which Quark does not deny.
From 4x25 "Body Parts":
Here, Brunt corroborates Quark's food (and medicine) smuggling and also approaches this from the opposite direction from Natima, accusing Quark of generosity because he had the opportunity to price gouge but he did not. This additional detail comes quite late in the series but does complicate the depiction of Quark's morality here. While Quark proudly admitted to Natima that he was being merely profit-seeking and mercenary in his interactions with Bajorans (in accordance with Ferengi moral norms), this exchange with Brunt casts doubt on the story that Quark was entirely motivated by profit... However, because it comes so late in the series, it's possible to read this as a retcon intended to soften/complicate Quark's character for the purposes of this episode's plot/conflict with Brunt, rather than a read that was intended for Quark's character the whole time.
Finally, there is a possibility that Quark smuggled weapons to the Bajoran resistance during the Terok Nor era. We never get confirmation of this; in fact, it's possible to read it as being disconfirmed. However, we do know several things: that Hagath sold weapons to the Bajoran resistance; one of his business associates at the time was Gaila, Quark's cousin; Quark has told Gaila sometime before 5x18 "Business as Usual" that he is unable to smuggle weapons through DS9 because of Odo's presence there (this does not preclude, however, Quark helping make alternative arrangements); and that Quark in general is willing to help sell weapons to terrorist groups (as in 2x20 "The Maquis") by connecting buyers with weapon suppliers.
Okay, given all these things, it's interesting then to note when Odo seems to compare other people's morality to Quark's and uses that almost like a measuring stick in order to determine when someone's morality is beyond the pale.
In 1x04 "A Man Alone," Odo notices a guest at Quark's who enrages him. Odo tells the man he wants him off the station; they get in a fight that Sisko has to break up; and then Odo says that the man has one day to leave the station. What did that man do that caused Odo to despise him so much?
From 1x04 "A Man Alone":
This is quite interesting given what we (much later) find out about Quark. There's a lot of parallels here between Quark and Ibudan: we know Quark also smuggled medical supplies and also that he frequently bribed Cardassian officers to get them to look the other way. However, Quark does come out of this direct comparison looking pretty good because he didn't price gouge desperate Bajorans and he never killed anyone either. Given that, right before confronting Ibudan, Odo was having a semi-friendly, semi-antagonistic chat with Quark, this scene implicitly draws a strong contrast between Odo's moral evaluation of Ibudan vs. his tolerance for Quark who is in some ways quite a similar character to Ibudan.
Then later, in 2x08 "Necessary Evil," Odo finds out that the thing a list of Bajorans share in common is having collaborated with the Cardassian government:
From 2x08 "Necessary Evil":
Interesting that Odo chooses Ferengi as the comparison class here. Once again, Quark's -- and also Rom's -- morality provides an interesting contrast to the people whom Odo is morally judging. Ferengi are not particularly scrupulous -- in this episode, even, there is much attention paid to the fact that Rom has motive to murder Quark to inherit his bar; it is not above Ferengi to murder/backstab their own brothers to make profit, and this is something Rom has actually done in the past (1x11 "The Nagus"). Quark has even been accused (by Kira in 2x18 "Shadowplay") of being a Cardassian collaborator, and it's established in this episode that Quark was smuggling luxury contraband (ginger tea) to people who could afford it (the aforementioned collaborators). But neither Quark nor Rom are collaborators in the sense that Odo means here -- people who side against their own people in favor of a colonial government and enjoy the power/financial benefits of doing so.
In both of these cases, Odo seems to be comparing the behavior of other criminals or disreputable people to Quark, and he has very little patience for people who come out of that comparison unfavorably, suggesting Quark's morality forms a kind of "floor" that Odo is willing to tolerate. The fact that Odo's behavior to Quark (while undeniably antagonistic and hostile) still has an air of cordiality to it seems to suggest that in comparison, Quark is actually in Odo's good books (although maybe just manages to squeak by).
Another plausible read that extrapolates from canon here is that Quark, despite purporting to be amoral, greedy, self-interested, etc., seems to actually engage in quite dangerous behavior to help relatively powerless people who can't pay him much. You can interpret this in many ways, but the simplest is probably that Quark, despite his outer demeanor, is often moved to risk his life if he feels intense enough moral pressure/guilt from not doing so (this, for example, is the core dilemma for Quark in 5x18 "Business as Usual"; see also the stress Quark experiences when responsible for people's lives in 1x10 "Move Along Home"). Unlike Ibudan who is unmoved by the death of a child because the parents didn't have enough money, Quark is not this way.
So in short, Quark often takes dangerous, illegal action out of a sense of guilt, despite moral, social, and legal pressure to pretend to be entirely self-interested. In this way, Quark's morality forms a direct challenge to Odo's morality: Quark in a lot of ways is a terrible person, one that Odo has contempt for, but Quark is often willing to commit crimes more dangerous and transgressive than Odo is willing or able to do, out of moral guilt. In this way, I think Quark has the capacity to morally shame Odo, because even Quark, a terrible person, is sometimes willing to take actions that Odo wouldn't dream of doing, simply because Quark couldn't morally live with himself if he didn't. Again, Quark functions as a moral compass or floor that Odo is not willing to fall beneath.
Another point of contrast between Quark and Odo's morality is that Quark tends to be interpersonally immoral and impersonally moral while Odo tends to be interpersonally trustworthy and impersonally immoral. Ferengi morality tends to lead to annoying interpersonal interactions: Ferengi frequently lie to, cheat, exploit, and sexually harass the people around them. In other words, many people find Quark's style of immorality irritating just because interacting with him is so unpleasant. By contrast, Odo is someone you could trust would not mistreat or disrespect you in a one-on-one interaction. However, in terms of their macro-level politics, Quark probably did more for Bajoran independence than Odo did. In general, his large-scale political instincts are probably better than Odo's.
This brings me to my second point regarding the way Odo uses Quark's morality. Quark reveals the limits of Odo's strongly-held moral code.
Take, for instance, the act of selling weapons to terrorist groups. Odo is quite pacifist. Quark is too, but selling weapons to terrorist groups apparently isn't something he balks at (although selling to dictators who plan to mass murder their own citizens is). Odo on the other hand doesn't wear a weapon and (I assume) finds it morally unacceptable to sell weapons that are ultimately just tools for killing people. Whether it kills Cardassians or Bajorans matters a lot to the people embroiled in a conflict, but to Odo who holds himself apart from all races, it's just people killing other people, something that is always wrong and tragic. So selling weapons to a terrorist group is a clear violation of his own moral compass (add to that that it's obviously against the law). But if you take into account the whole situation, especially in the case of the Cardassian occupation of Bajor where you have two very unequal sides, with one side fighting for their lives and their freedom, it becomes less clear. Some of Quark's illegal activity is undeniably moral... and yet Odo would never do it himself, which I think is a complicated situation for Odo to find himself in.
I think Quark and Odo's relationship is very symbiotic in this way: Quark is capable of doing work that Odo would like to do but he is unable to do. By "unable to do," partly, I mean this is an external limitation: Odo is unable to visibly break the law from his position as an enforcer of the law. But partly I mean that it's an internal limitation too, which is that Odo can't bring himself to do it because it goes against his strongly-held and clear-cut personal rules and code (his personal pacifism). But in some sense, Quark allows him to externalize or outsource some of the more complicated and ambivalent parts of Odo's morality that Odo cannot indulge in himself.
We see plenty of examples when Odo makes use of Quark's skills, connections, resources, etc. -- for example, he makes use of Quark's ability to gather info in 2x02 "The Circle" and of Quark's illegal backdoors in 2x24 "The Collaborator" -- presumably the reason why the station keeps Quark around. Odo also acts to free Natima in 2x18 "Profit and Loss" but only at Quark's request. In this way, Quark allows Odo to get around parts of the law he finds unjust while still occupying the role of the enforcer (not breaker) of laws and maintaining trust and the appearance of being "by the book" and principled, by having this separation of morality systems: "Quark does illegal thing [x]. I just chose to look the other way/forgive him when he did that." By enabling Quark to act in the way that he is naturally inclined to act, Odo can avoid the moral failing of refusing to act in a situation that demanded action.
Explorations of this form of morality-by-proxy are very common on ST:DS9. Take, for example, the memorable dynamic between Sisko and Garak in 5x19 "In the Pale Moonlight": Garak is the one actually carrying out the scheming, lying/fabrication, and assassination, but it is all done with Sisko's approval and complicity.
Kira's morality also seems to have a very similar function as Quark's, except inverted in a lot of ways. Whereas Quark is an ostensibly amoral character (he's not actually amoral but he subscribes to a kind of self-interested morality that comes off as callous amorality or moral indifference to most people), Kira is an openly morally-fervent character, very similar to Odo, actually. In other words, Quark is self-interested (a clear vice), while Kira devotes herself to a larger cause to the point of self-sacrifice. Quark's tendency is toward inaction in terms of risking his life to help those in need, but he is capable of being guilted into moral action. Meanwhile, Kira's "the ends justify the means" morality means that she has calculated that proactive immoral action (killing the innocent) is morally required of her even if she is wracked by guilt afterward and has to harden her morality into an overly-simplistic good vs. evil, with-us-or-against-us dichotomy in order to keep doing what she does:
From 1x12 "Battle Lines":
From 5x11 "The Darkness and the Light":
From 7x21 "When It Rains...":
Like Quark, Kira's morality presents a direct challenge to Odo's: she is someone who is driven by morality to fight and kill, even self-sacrificially make herself a worse person and damage her own psyche in pursuit of a better world and to defend others who cannot defend themselves. However, in the reverse of Quark's, her morality forms an upper bound on Odo's morality, a threshold that he is not willing to cross in the name of justice / goodness / morality. Both Odo and Kira live their life in the service of the greater good, but in her violence, Kira crosses a line that is too central to Odo's moral code for him to cross himself. Therefore, she reveals the limits of what sorts of action Odo is willing to take in the name of justice.
In another contrast between Kira and Quark, despite Kira's history of violence, as a person, Kira is much easier to respect and have as a friend than Quark, which probably explains the big difference in Odo's attitude toward them, despite the fact that he has known both of them for a long time. Whereas Quark tends to be interpersonally quite irritating, both Odo and Kira are people who you could trust would treat you with respect and integrity in a one-on-one sort of interaction, even though they are morally compromised in other ways.
As this thread points out, in terms of personality and values, Kira is actually quite similar to Odo: they are both passionate about justice, competent and professional, blunt/outspoken, strong-willed/stubborn, tough, quite rigid in their morality, and they work together in the same organization. This makes it easier for Kira and Odo to be friends (while Odo and Quark are "enemies"). And because of these large amounts of similarity in their personalities, Kira also forms a kind of natural mirror or foil for Odo, because she presents a path that in some other world he might have walked, but which he has consciously rejected. The main difference between them is that Kira subscribes to a kind of utilitarianism where the ends justify the means while Odo subscribes to a kind of deontological moral system where adherence to moral rules is what is important, and this ultimately leads to different notions of justice, despite a lot of similarity.
Very similar to Quark, Kira as a Resistance member has predictable behavioral tendencies that fall outside Odo's strict rules. Whereas Quark sometimes feels morally compelled to take illegal (locally) non-violent actions, Kira also sometimes feels morally compelled to take illegal (locally) violent action, both of which Odo disapproves of and would not engage in himself. But by legally protecting Quark and Kira from the consequences of their actions, Odo is able to act by proxy in situations where to refuse to act is itself a morally-fraught choice, while strictly adhering to his principles.
As a result, Odo cannot directly acknowledge his approval of Quark and Kira's actions, as this would defeat the separation he has set up between himself and them. However, his friendship with both of them implicitly indicates there is some amount of (ambivalent) moral approval of their very different moral systems.
I think Odo's morality has been shaped during his time on Terok Nor by both Quark and Kira, who both provide alternative forms of (im)morality to Odo's own system. In particular, Quark is a lower bound that indicates what level of self-interested lawlessness Odo is willing to tolerate while Kira is an upper bound that indicates what actions taken in the name of justice Odo is unwilling to engage in. It is easy to read Odo as having learned about the limitations of his moral code through their examples, and that he expresses some of his morality through both of them by permitting them to act predictably in ways that go against his own strongly-held personal code. To summarize this post, I made this chart comparing the different approaches Quark, Odo, and Kira have toward morality and the people/systems around them:

This is one of my favorite topics so I decided to expound a bit more on what I think Odo's morality is as depicted in the show, and how I think Quark and Kira shaped that morality.
Caveats
Just a note before going into my thoughts about Odo's moral compass: One of the things that is difficult about putting together a coherent picture of Odo's morality is that (1) the show is inconsistent and contradictory in its depiction of Odo's morality, and (2) the show also, I think, makes missteps in its depiction of Odo's morality. Both of these things result in, at best, unexplained puzzles that the viewer must solve by filling in details or, at worst, plot holes that require the viewer to throw away or mentally rewrite bits of canon in order to come up with a better/more realistic/more consistent depiction of Odo.
What I mean by (1) is that Quark and Odo's relationship is kind of infamously incoherent and open to multiple reads about what is going on between them. Because Quark's morality departs so far from Odo's stated morality, Odo's relationship and attitude toward Quark (which can range in interpretation from plain and simple hatred/contempt to having a crush on or being in a relationship with Quark the whole time) does have ramifications on what Odo's morality (in practice) is. Without being able to piece together a consistent read of Odo and Quark's relationship, it is hard to decide on what Odo's morality is in fact meant to be.
What I mean by (2) is that I think the writers intended Odo to be overall a "good"-aligned character and a character you can recognize as being morally upright and a good/moralistic person, although one that has shades of grey and less savory aspects to his character and one that (like MANY ST:DS9 characters) is thoroughly morally compromised. However, I think the writers miscalibrated their moral scale slightly when it comes to Odo. I think ST:DS9 puts a bit too much weight on Odo's moral virtue stemming from the fact that he is a "neutral" "impartial" outsider observing humanoid conflict and legal systems and stringently applying that neutrality in a way to improve them. To modern audiences, though, even someone who actually IS perfectly neutral and impartial and unbiased (and not simply claiming to be such) in a system as skewed as the Cardassian occupation of Bajor is prrrobably doing much more to prop up that system and launder its obvious injustices into a misleading veneer of respectability than they are making anything better. As such, I think Odo comes out of the occupation looking much worse than what was the writers' intent. For example, I think 5x08 "Things Past" is an interesting episode but is badly calibrated. From everything we know about Odo, he probably has plenty to feel bad about even if he carried out justice (as he felt it) perfectly aboard Terok Nor. You can complicate his character quite a lot just by showing him to be a good and competent cop/chief of security aboard Terok Nor; instead the writers choose to depict Odo's "failings" aboard Terok Nor as stemming from sloppy detective work where he fails to find the real culprits of a crime and instead condemns innocent people to execution. In my mind, this is my mental model of what I think the writers intended with that episode and why I think it failed to accomplish its goals:

I think the writers thought they were writing a character who, through his strong sense of justice but position within Dukat's colonial government was complicated but generally seen as a good/friendly presence on Terok Nor by Bajorans. Adding nuance to his character would therefore mean depicting him falling short of people's image of him. However, to a more modern audience, even when doing his job perfectly, Odo is already quite a morally-compromised character. In order to make it believable that Bajorans respect and trust him, he must have been doing something else outside the chief of security role that they felt was helpful and beneficial. But we barely see evidence of this in the show aside from Odo withholding information once in order to protect Kira (implicitly "picking a side," as she puts it, in the Cardassian-Bajoran conflict). In order to add nuance to his character and also make his character comprehensible, the show actually needs to go the opposite direction -- show us more of Odo doing things that would have gotten him in Bajorans' good books, show us that what he did for Kira was part of a larger consistent pattern he engaged in during his time at Terok Nor, not a one-off thing, and certainly not reveal things that make his character during the occupation look even worse than it already is. While the show does plenty to indicate it understands that Odo's position at Terok Nor was not morally clear-cut -- the show clearly depicts Odo as Not a Good Person and shows that many people actually do view him as a collaborator -- it is ultimately very hard to square facts like (a) Odo being chief of security on Terok Nor and coming out of the occupation still able to occupy that position on DS9, and (b) Kira having such a close and trusting friendship with him from the very start of the series, with Odo's personality and his actions on Terok Nor. So this is what I mean when I say that the writers made some missteps in Odo's depiction. I think how Odo is actually depicted in terms of his morality comes apart significantly from what the writers thought they were depicting, and so I have to kind of choose between interpreting Odo's character based on what is actually there in the show vs. interpreting it based on what I think was the underlying intention re: his character.
Okay, with those preliminary caveats out of the way, let's get into the main argument I want to make, which is that, despite all the issues mentioned above, the way that I read Odo is that Odo relies heavily on Quark's moral compass to do two things for Odo: (1) to calibrate Odo's own moral code (Quark as a moral teacher for Odo), and (2) to allow Odo to indirectly express parts of his morality that he is too squeamish to engage in himself (Quark as a proxy/symbiotic moral agent that complements Odo's stated morality). While Odo never verbally acknowledges that Quark is (in some ways) a good person or that Odo morally approves of some of his sketchier actions, I think it is somewhat implied by the fact that Quark is still at Terok Nor/DS9 that, all-in-all, Quark remains in Odo's "good books" despite how much Odo attests that he's going to arrest Quark (you know... any day now...) and how hostile he is toward Quark. I also think Odo's relationship with Kira is much the same, where Kira, like Quark, challenges Odo's morality and causes him to have to rethink his moral positions, and also that Kira too is a proxy/symbiotic moral agent that allows Odo to indirectly "act" in ways he normally could not.
Some basics about Odo's morality
First off, let me just collect some things from canon that I think establish the basic contours of Odo's morality:
1. Odo has a strong sense of justice / is a moralistic person / believes himself to be a force of justice in the world. Whether or not he actually has this effect at any time is highly debatable, but I think we can assume that Odo at least believes himself to have a strong grasp of the good and to be consciously and constantly striving to take action in service of that notion of The Good.
From 2x08 "Necessary Evil":
Odo: Nobody ever had to teach me the justice trick. That's something I've always known. A racial memory from my species, I guess. It's really the only clue I have to what kind of people they are.
From 2x18 "Profit and Loss":
Odo: All right. I'll do it.
Quark: You will?
Odo: But not for you. Turning Hogue and Rekelen over to the Cardassians would mean their deaths. I've read their files and nothing they've done warrants that kind of punishment. I'll free them, Quark, but only in the name of justice.
Some examples of Odo viewing justice to be core to his motivation/personality.
From 3x02 "The Search, part II":
Odo: I've devoted my life to the pursuit of justice, but justice means nothing to you, does it?
Female Changeling: It's not justice you desire, Odo, but order. The same as we do.
Justice vs. order is a frequent recurring theme/dilemma in Odo's storylines and is where he comes apart from his Changeling brethren. Odo frequently rejects the project of the Founders as being immoral and separates himself from them (morally and physically) and even works to undermine their efforts.
From 3x07 "Civil Defense":
Quark: It's because they knew you were an honorable man. The kind of person who would do the right thing regardless of the circumstances. And now your integrity is going to get us both killed. I hope you're happy.
This is Quark's evaluation of Odo and is treated as something kind and reassuring to say, something that Odo would be pleased to have someone say about him (of course, Quark tempers the praise with insults at the end). Honor and integrity are clearly important to Odo.
In addition, we frequently see Odo contemptuous of other people's moral failings. Quark is one frequent target of Odo's contempt but he also shows contempt for other individuals throughout the series. He's just generally a very judgy/moralistic person and I think this helps establish him as someone primarily motivated by justice.
2. Odo has a complicated relationship to law and regulations. On one hand, it's clear that Odo has a general preference for things to be orderly -- people complying with the rules and regulations he's set up on the station, people not breaking the law, people not disturbing the peace/ordinary day-to-day operations. However, on the other hand, he will frequently disregard laws and regulations he views to be irritating or illegitimate. Yet at the same time, he will often appeal to legal systems and laws in order to discipline bad actors and constrain the ability of people to act badly.
From 2x22 "The Wire":
Odo: I routinely monitor all of Quark's subspace communications.
Bashir: Is that legal?
Odo: It's in the best interests of station security.
An example of Odo blatantly and intentionally disregarding local laws to maintain station security. See also the above actions regarding the Cardassian dissidents in 2x18 "Profit and Loss," where Odo cooperates with Quark to use an illegal cloaking device to smuggle Natima and co. off the station in direct violation of an agreement between the Bajoran AND Cardassian governments, upheld by the Federation, to hand Natima over to Cardassia.
From 2x20 "The Maquis, part I":
Odo: If you will let me be in charge of Security I will give you a safe station. You people tell me to do my job then give me a Federation rulebook listing all the things I can't do. Untie my hands before you start to blame me, Mister O'Brien.
Dax: I'm sure no one meant to blame you, Odo.
Odo: Give me the right to set a curfew, let me do more searches of arriving passengers, give me fifty more deputies.
Kira: And this station will be just the way it was during the occupation.
By contrast, this is an example of Odo complaining about how his actions are limited by local regulations. It's also an indication that, if Odo were in charge of setting policy and laws, his natural inclination/morality leans quite authoritarian, moreso than the Federation, and probably also Ferengi and Bajoran culture too (certainly more than Kira). Of course, the measures he lists here are indeed things he needs some amount of institutional support/buy-in/resources in order to accomplish. This maybe gives an important hint at Odo's morality which is that illegal actions, especially ones that can be executed on his own, surreptitiously and privately, he is perfectly willing to do.
From 4x16 "Bar Association":
Quark: I need you to get those traitors [his striking workers] away from my front door. They're blocking access to my place of business, causing a disturbance on the Promenade, and they're probably a fire hazard. They belong in a holding cell, every last one of them.
Odo: Well, I hate to admit this, but I agree with you. From what Chief O'Brien tells me about strikes, they sound like trouble. I don't like mobs. In my opinion, if you need one to get what you want, it's not worth getting.
Quark: Good. Then you'll haul them away.
Odo: I'll do nothing of the sort.
Quark: But you said--
Odo: I know what I said. But I have strict orders from Captain Sisko not to impinge on your employees' freedom of expression. As long as they stay peaceful and allow your customers access through the second level entrance, I'm not allowed to interfere.
Another example of Odo refusing to break local laws and orders even though it conflicts with his own personal preferences/moral system. Perhaps a bit complicated by the fact that thwarting Quark might be part of Odo's motivation here...
From 5x19 "In the Pale Moonlight":
Sisko: I can't have any record of him being on the station.
Odo: I see. I am certainly aware of the need for special security measures during wartime, but as a matter of law, if Quark chooses to press charges against Tolar, I have no choice but to make an arrest.
Here, Odo appeals to the law as a way of thwarting Sisko, despite the fact that Odo can and does disregard the law when it suits him. Possibly the difference here is that this is a security incident, which Odo views as his intrinsic duty to investigate and pursue. It's also possible that Odo's recalcitrance comes from a suspicion of authority figures bending the rules to suit them, behavior that Odo might find it his duty to curtail and obstruct wherever possible. (On a shippy read, it's also possible Odo's stubbornness is related to the fact that Quark was hurt in the incident.)
It's kind of hard to piece together a coherent picture of Odo because of all this. The best I can do is to say that Odo has a somewhat bifurcated approach to moral and legal systems. If the moral/legal system is one that coheres with Odo's own morality (including systems he himself has designed), any amount of authoritarianism is justified in carrying out and enforcing that moral system. If the moral/legal system is one he disagrees with, though, it loses all form of legitimacy and Odo no longer feels like such rules apply to him. He is willing to take any action he views as just, if it can be carried out by himself in a fairly invisible manner.
3. Odo is at least somewhat critical of the Cardassian occupation. As far as I can tell, Odo doesn't frequently state what he thinks about the Cardassian occupation of Bajor. However, we do know that he was Terok Nor's final chief of security (1x04 "A Man Alone") -- as in, he stuck around the administration for several years and held a fairly significant position therein -- and that during 2x08 "Necessary Evil," he was quite blunt to Dukat about his low opinion of the Cardassian occupation:
Dukat: Have you ever seen a dead man before?
Odo: Yes. In your mines.
Dukat: I'm talking about order here. Justice.
Odo: There's very little justice in the Cardassian occupation of Bajor.
It's a bit unclear whether Odo's opinion is that any sort of colonial situation is intrinsically unjust and illegitimate or whether he just disapproved of specific abuses present in the current regime. However, we can certainly say that, though Cardassian-aligned in his position and at times easily manipulated by Dukat into accomplishing Dukat's goals (2x08 "Necessary Evil"; 5x08 "Things Past"), Odo was clear-eyed about the cruel way in which Bajorans were treated during the occupation.
4. Odo is personally a pacifist who eschews deadly violence in his role as a security officer, but he has taken life indirectly by submitting suspected criminals to the death penalty.
It's established from the very beginning that Odo never uses phasers/weapons, nor does he allow such things on the Promenade (1x01 "Emissary"). This suggests a preference toward using non-lethal ways of dealing with security threats. This is reiterated in 3x26 "The Adversary" in foreshadowing before the first time Odo (unintentionally) takes a life:
Eddington: [to Odo] You sure I can't interest you in one of these [a phaser]?
Odo: I don't use them. Besides, in the history of my people, no changeling has ever harmed another. I'd hate to be the first.
Eddington: Apparently that changeling doesn't feel the same way. If we don't stop him, no one on board will escape unharmed. Including you.
Odo: You may be right. But I've been a security officer most of my humanoid existence and in all that time, I've never found it necessary to fire a weapon or take a life. I don't intend to start now.
However, people that Odo suspected were terrorists did get executed on Terok Nor and Odo mainly seems more upset about the fact that they were possibly innocent and less so about the fact that the punishment was death (5x08 "Things Past"), and a Cardassian points out in 7x21 "When It Rains..." that Odo, in his role as chief of security, handed Bajorans over to the Cardassian legal system, which we know at this point features elements like torture, show trials, and death penalties.
From 7x21 "When It Rains...":
Seskal: Odo. When you were the Head of Security on Terok Nor, what did you think was going to happen to the Bajoran prisoners you arrested?
Kira: You don't have to answer that.
[...]
Odo: I expected that my prisoners would be dealt with justly, but I soon came to realize that Cardassians have little interest in justice.
Seskal: Ah. Well, then, why didn't you resign in protest?
Kira gets annoyed before Odo can answer, but anyway, it's clear that it's part of Odo's code that he doesn't kill, although this is a bit hard to square with the fact that he has taken actions that led to people being executed.
Some basics about Quark's illegal activities on Terok Nor
Here, I just want to review some facts about how Quark behaved when he was on Terok Nor, some of which comes fairly late in the series.
From 2x08 "Necessary Evil":
Odo: She paid you for an alibi? I wonder how Gul Dukat will react when I tell him about that.
Quark: I'm sure it'll cost me a case of Cardassian ale.
Dukat: Two cases at the very least. A broken alibi. That sounds like progress.
Here, it's clear that Quark regularly lied/gave cover stories for people in exchange for money. Also, this brief exchange between Quark and Dukat suggests that they had a very similar relationship that Quark and Sisko have during the show. Namely, Quark is repeatedly caught engaging in crimes, but Dukat, clearly believing that Quark's presence on the station is overall a positive/worth it, frequently looks the other way and protects Quark from the full consequences of his actions. One way you could read this exchange is that it is indicative of widespread Cardassian petty corruption, where you can get away with something illegal as long as you give the right people an appropriate bribe. Or you could read it similar to Sisko and Quark's relationship where Quark is allowed to get away with some illegal activity that interferes with station operations but he is usually given a minor slap-on-the-wrist punishment to indicate the administration Disapproves but then is allowed to continue with his business nonetheless. In any case, this indicates that some of Quark's antisocial/subversive activity on Terok Nor was done out in the open, basically, with permission from the administration.
From 2x18 "Profit and Loss":
Quark: I owe you. You saved my life. If you'd turned me over to the authorities, I would have been executed.
Natima: I admired your courage. It was a brave thing you were doing, selling food to the Bajorans. I thought you were a man of honor.
Quark: I'm a Ferengi. You should've known better.
Quark: I didn't betray you.
Natima: Don't lie to me, Quark. I know better. You used my personal access codes to authorize payments for goods you never provided.
Quark: So I took a little money from the Cardassian Communication Service. They could afford it.
Natima: You stole that money.
Quark: I saw a chance for profit and I took it. Maybe that was wrong. I don't know. But what I really regret is betraying your trust. That was the worst mistake of my life.
Natima: And you'd do it again in a second. I believed in you, Quark. But you were using me like you use everyone. For profit.
This dialogue between Quark and Natima indicates that Quark smuggled food to Bajorans (something that could have resulted in the death penalty) and also used Natima's credentials to embezzle money from her employer. It also indicates that Natima originally thought that Quark's actions were done for noble reasons and was disappointed to find out that it was out of self-interested profit, which Quark does not deny.
From 4x25 "Body Parts":
Brunt: You give your customers credit at the bar. You only take a thirty percent kickback from your employees' tips, and you sold food and medicine to Bajoran refugees at cost!
Quark: That's not true. It was just above cost.
Brunt: Close enough. It was still a generous, hu-mon-itarian gesture.
Here, Brunt corroborates Quark's food (and medicine) smuggling and also approaches this from the opposite direction from Natima, accusing Quark of generosity because he had the opportunity to price gouge but he did not. This additional detail comes quite late in the series but does complicate the depiction of Quark's morality here. While Quark proudly admitted to Natima that he was being merely profit-seeking and mercenary in his interactions with Bajorans (in accordance with Ferengi moral norms), this exchange with Brunt casts doubt on the story that Quark was entirely motivated by profit... However, because it comes so late in the series, it's possible to read this as a retcon intended to soften/complicate Quark's character for the purposes of this episode's plot/conflict with Brunt, rather than a read that was intended for Quark's character the whole time.
Finally, there is a possibility that Quark smuggled weapons to the Bajoran resistance during the Terok Nor era. We never get confirmation of this; in fact, it's possible to read it as being disconfirmed. However, we do know several things: that Hagath sold weapons to the Bajoran resistance; one of his business associates at the time was Gaila, Quark's cousin; Quark has told Gaila sometime before 5x18 "Business as Usual" that he is unable to smuggle weapons through DS9 because of Odo's presence there (this does not preclude, however, Quark helping make alternative arrangements); and that Quark in general is willing to help sell weapons to terrorist groups (as in 2x20 "The Maquis") by connecting buyers with weapon suppliers.
Odo uses Quark's morality as a baseline/floor when judging other people's morality
Okay, given all these things, it's interesting then to note when Odo seems to compare other people's morality to Quark's and uses that almost like a measuring stick in order to determine when someone's morality is beyond the pale.
In 1x04 "A Man Alone," Odo notices a guest at Quark's who enrages him. Odo tells the man he wants him off the station; they get in a fight that Sisko has to break up; and then Odo says that the man has one day to leave the station. What did that man do that caused Odo to despise him so much?
From 1x04 "A Man Alone":
Odo: His name is Ibudan. He used to run black market goods through here to the surface during the Cardassian occupation, gouging his fellow man who needed medical supplies and so forth. Some Bajorans actually considered him a hero, but I saw him let a child die when the parents couldn't afford the drug that would've saved her life. A few years back, he killed a Cardassian officer who wanted a payoff to look the other way. He went to prison for murder. I sent him there.
This is quite interesting given what we (much later) find out about Quark. There's a lot of parallels here between Quark and Ibudan: we know Quark also smuggled medical supplies and also that he frequently bribed Cardassian officers to get them to look the other way. However, Quark does come out of this direct comparison looking pretty good because he didn't price gouge desperate Bajorans and he never killed anyone either. Given that, right before confronting Ibudan, Odo was having a semi-friendly, semi-antagonistic chat with Quark, this scene implicitly draws a strong contrast between Odo's moral evaluation of Ibudan vs. his tolerance for Quark who is in some ways quite a similar character to Ibudan.
Then later, in 2x08 "Necessary Evil," Odo finds out that the thing a list of Bajorans share in common is having collaborated with the Cardassian government:
From 2x08 "Necessary Evil":
Sisko: Blackmail?
Odo: Blackmail.
Sisko: What did they have to hide?
Odo: For one thing, that they'd come out of the occupation with that kind of money.
Dax: You think they were working with the Cardassians.
Odo: Selling out their own world for a profit. (contemptuously) Collaborators. Not even a Ferengi would do that.
Interesting that Odo chooses Ferengi as the comparison class here. Once again, Quark's -- and also Rom's -- morality provides an interesting contrast to the people whom Odo is morally judging. Ferengi are not particularly scrupulous -- in this episode, even, there is much attention paid to the fact that Rom has motive to murder Quark to inherit his bar; it is not above Ferengi to murder/backstab their own brothers to make profit, and this is something Rom has actually done in the past (1x11 "The Nagus"). Quark has even been accused (by Kira in 2x18 "Shadowplay") of being a Cardassian collaborator, and it's established in this episode that Quark was smuggling luxury contraband (ginger tea) to people who could afford it (the aforementioned collaborators). But neither Quark nor Rom are collaborators in the sense that Odo means here -- people who side against their own people in favor of a colonial government and enjoy the power/financial benefits of doing so.
In both of these cases, Odo seems to be comparing the behavior of other criminals or disreputable people to Quark, and he has very little patience for people who come out of that comparison unfavorably, suggesting Quark's morality forms a kind of "floor" that Odo is willing to tolerate. The fact that Odo's behavior to Quark (while undeniably antagonistic and hostile) still has an air of cordiality to it seems to suggest that in comparison, Quark is actually in Odo's good books (although maybe just manages to squeak by).
Quark and Odo as moral foils
Another plausible read that extrapolates from canon here is that Quark, despite purporting to be amoral, greedy, self-interested, etc., seems to actually engage in quite dangerous behavior to help relatively powerless people who can't pay him much. You can interpret this in many ways, but the simplest is probably that Quark, despite his outer demeanor, is often moved to risk his life if he feels intense enough moral pressure/guilt from not doing so (this, for example, is the core dilemma for Quark in 5x18 "Business as Usual"; see also the stress Quark experiences when responsible for people's lives in 1x10 "Move Along Home"). Unlike Ibudan who is unmoved by the death of a child because the parents didn't have enough money, Quark is not this way.
So in short, Quark often takes dangerous, illegal action out of a sense of guilt, despite moral, social, and legal pressure to pretend to be entirely self-interested. In this way, Quark's morality forms a direct challenge to Odo's morality: Quark in a lot of ways is a terrible person, one that Odo has contempt for, but Quark is often willing to commit crimes more dangerous and transgressive than Odo is willing or able to do, out of moral guilt. In this way, I think Quark has the capacity to morally shame Odo, because even Quark, a terrible person, is sometimes willing to take actions that Odo wouldn't dream of doing, simply because Quark couldn't morally live with himself if he didn't. Again, Quark functions as a moral compass or floor that Odo is not willing to fall beneath.
Another point of contrast between Quark and Odo's morality is that Quark tends to be interpersonally immoral and impersonally moral while Odo tends to be interpersonally trustworthy and impersonally immoral. Ferengi morality tends to lead to annoying interpersonal interactions: Ferengi frequently lie to, cheat, exploit, and sexually harass the people around them. In other words, many people find Quark's style of immorality irritating just because interacting with him is so unpleasant. By contrast, Odo is someone you could trust would not mistreat or disrespect you in a one-on-one interaction. However, in terms of their macro-level politics, Quark probably did more for Bajoran independence than Odo did. In general, his large-scale political instincts are probably better than Odo's.
Quark allows Odo to externalize some of his morality he is too squeamish to engage in himself directly
This brings me to my second point regarding the way Odo uses Quark's morality. Quark reveals the limits of Odo's strongly-held moral code.
Take, for instance, the act of selling weapons to terrorist groups. Odo is quite pacifist. Quark is too, but selling weapons to terrorist groups apparently isn't something he balks at (although selling to dictators who plan to mass murder their own citizens is). Odo on the other hand doesn't wear a weapon and (I assume) finds it morally unacceptable to sell weapons that are ultimately just tools for killing people. Whether it kills Cardassians or Bajorans matters a lot to the people embroiled in a conflict, but to Odo who holds himself apart from all races, it's just people killing other people, something that is always wrong and tragic. So selling weapons to a terrorist group is a clear violation of his own moral compass (add to that that it's obviously against the law). But if you take into account the whole situation, especially in the case of the Cardassian occupation of Bajor where you have two very unequal sides, with one side fighting for their lives and their freedom, it becomes less clear. Some of Quark's illegal activity is undeniably moral... and yet Odo would never do it himself, which I think is a complicated situation for Odo to find himself in.
I think Quark and Odo's relationship is very symbiotic in this way: Quark is capable of doing work that Odo would like to do but he is unable to do. By "unable to do," partly, I mean this is an external limitation: Odo is unable to visibly break the law from his position as an enforcer of the law. But partly I mean that it's an internal limitation too, which is that Odo can't bring himself to do it because it goes against his strongly-held and clear-cut personal rules and code (his personal pacifism). But in some sense, Quark allows him to externalize or outsource some of the more complicated and ambivalent parts of Odo's morality that Odo cannot indulge in himself.
We see plenty of examples when Odo makes use of Quark's skills, connections, resources, etc. -- for example, he makes use of Quark's ability to gather info in 2x02 "The Circle" and of Quark's illegal backdoors in 2x24 "The Collaborator" -- presumably the reason why the station keeps Quark around. Odo also acts to free Natima in 2x18 "Profit and Loss" but only at Quark's request. In this way, Quark allows Odo to get around parts of the law he finds unjust while still occupying the role of the enforcer (not breaker) of laws and maintaining trust and the appearance of being "by the book" and principled, by having this separation of morality systems: "Quark does illegal thing [x]. I just chose to look the other way/forgive him when he did that." By enabling Quark to act in the way that he is naturally inclined to act, Odo can avoid the moral failing of refusing to act in a situation that demanded action.
Explorations of this form of morality-by-proxy are very common on ST:DS9. Take, for example, the memorable dynamic between Sisko and Garak in 5x19 "In the Pale Moonlight": Garak is the one actually carrying out the scheming, lying/fabrication, and assassination, but it is all done with Sisko's approval and complicity.
Kira's morality functions as a ceiling for Odo's morality
Kira's morality also seems to have a very similar function as Quark's, except inverted in a lot of ways. Whereas Quark is an ostensibly amoral character (he's not actually amoral but he subscribes to a kind of self-interested morality that comes off as callous amorality or moral indifference to most people), Kira is an openly morally-fervent character, very similar to Odo, actually. In other words, Quark is self-interested (a clear vice), while Kira devotes herself to a larger cause to the point of self-sacrifice. Quark's tendency is toward inaction in terms of risking his life to help those in need, but he is capable of being guilted into moral action. Meanwhile, Kira's "the ends justify the means" morality means that she has calculated that proactive immoral action (killing the innocent) is morally required of her even if she is wracked by guilt afterward and has to harden her morality into an overly-simplistic good vs. evil, with-us-or-against-us dichotomy in order to keep doing what she does:
From 1x12 "Battle Lines":
Opaka: Just what impression do you think I have?
Kira: That... that I enjoy any of this. I... I don't enjoy fighting. Yes, I've... I've fought my entire life, but for a good cause. For our freedom, our independence. And it was brutal and ugly, and... I.... But that's over for me now. That's... that's not who I am. I don't want you to think that I am this... violent person without a soul, without a conscience. That-that is not who I am.
From 5x11 "The Darkness and the Light":
Kira: So you were wounded during an attack I carried out when I was part of the resistance, and I'm supposed to feel guilty? We were at war, Silaran. Fifteen million Bajorans died during the occupation and you want me to feel sorry for you?
From 7x21 "When It Rains...":
Kira: Believe me, I understand how you feel. During the occupation, I didn't want to attack any facility that had a Bajoran working in it. But I did it. Because they were collaborators. They were working with the enemy.
Like Quark, Kira's morality presents a direct challenge to Odo's: she is someone who is driven by morality to fight and kill, even self-sacrificially make herself a worse person and damage her own psyche in pursuit of a better world and to defend others who cannot defend themselves. However, in the reverse of Quark's, her morality forms an upper bound on Odo's morality, a threshold that he is not willing to cross in the name of justice / goodness / morality. Both Odo and Kira live their life in the service of the greater good, but in her violence, Kira crosses a line that is too central to Odo's moral code for him to cross himself. Therefore, she reveals the limits of what sorts of action Odo is willing to take in the name of justice.
Odo and Kira's moral and personal similarity
In another contrast between Kira and Quark, despite Kira's history of violence, as a person, Kira is much easier to respect and have as a friend than Quark, which probably explains the big difference in Odo's attitude toward them, despite the fact that he has known both of them for a long time. Whereas Quark tends to be interpersonally quite irritating, both Odo and Kira are people who you could trust would treat you with respect and integrity in a one-on-one sort of interaction, even though they are morally compromised in other ways.
As this thread points out, in terms of personality and values, Kira is actually quite similar to Odo: they are both passionate about justice, competent and professional, blunt/outspoken, strong-willed/stubborn, tough, quite rigid in their morality, and they work together in the same organization. This makes it easier for Kira and Odo to be friends (while Odo and Quark are "enemies"). And because of these large amounts of similarity in their personalities, Kira also forms a kind of natural mirror or foil for Odo, because she presents a path that in some other world he might have walked, but which he has consciously rejected. The main difference between them is that Kira subscribes to a kind of utilitarianism where the ends justify the means while Odo subscribes to a kind of deontological moral system where adherence to moral rules is what is important, and this ultimately leads to different notions of justice, despite a lot of similarity.
Kira allows Odo to externalize some of his morality he is too squeamish to engage in himself directly
Very similar to Quark, Kira as a Resistance member has predictable behavioral tendencies that fall outside Odo's strict rules. Whereas Quark sometimes feels morally compelled to take illegal (locally) non-violent actions, Kira also sometimes feels morally compelled to take illegal (locally) violent action, both of which Odo disapproves of and would not engage in himself. But by legally protecting Quark and Kira from the consequences of their actions, Odo is able to act by proxy in situations where to refuse to act is itself a morally-fraught choice, while strictly adhering to his principles.
As a result, Odo cannot directly acknowledge his approval of Quark and Kira's actions, as this would defeat the separation he has set up between himself and them. However, his friendship with both of them implicitly indicates there is some amount of (ambivalent) moral approval of their very different moral systems.
In summary
I think Odo's morality has been shaped during his time on Terok Nor by both Quark and Kira, who both provide alternative forms of (im)morality to Odo's own system. In particular, Quark is a lower bound that indicates what level of self-interested lawlessness Odo is willing to tolerate while Kira is an upper bound that indicates what actions taken in the name of justice Odo is unwilling to engage in. It is easy to read Odo as having learned about the limitations of his moral code through their examples, and that he expresses some of his morality through both of them by permitting them to act predictably in ways that go against his own strongly-held personal code. To summarize this post, I made this chart comparing the different approaches Quark, Odo, and Kira have toward morality and the people/systems around them:
