Is there a categorical characterization of covering maps? Given a topological space $X$, some spaces $S$ will be covering spaces for $X$ and other spaces won't. Furthermore, some continuous maps $\pi: S \rightarrow X$ will be covering maps, and other maps won't be. I'm interested in whether or not these notions (covering space, covering map) can be defined inside the category $\bf{Top}$ "using only notions of category theory", that is talking only about objects and morphisms, and without actually looking at the points of the spaces.
(We only need to characterize the covering maps inside $\bf{Top}$, since a space is a covering space of another space iff a covering map exists between them.)
The motivation for this question and the reason to think that such a characterization may at all be possible, is due to the well-known lifting properties of covering maps. For example, it is well-known that given a covering map $\pi:S\rightarrow X$ and a path $p:[0,1] \rightarrow X$ in $X$, there exists a unique path $p':[0,1] \rightarrow S$ in $S$ such that $p=\pi \circ p'$ (the path-lifting property). There's also the homotopy-lifting property of covering maps and some other lifting theorems.
Such lifting properties have a very "categorical" taste, as they discuss only existence and uniqueness of morphisms in $\bf{Top}$ and guarantee that a certain diagram be commutative. Overall, they 'smell' similar to other constructions in category theory that guarantee the commutativity of a certain diagram (such as limits). However, the path-lifting property itself is not (to my knowledge) unique to covering maps. This raises the question of whether or not some very general 'lifting property' exists that exactly characterizes covering maps, and such a property should (I think) be describable in the language of category theory.
To summarize, my questions are:

*

*Is there some condition on a morphism in $\bf{Top}$ that can be described in the language of category theory (without quantifying over the elements of a space, as is done in the usual definition of covering maps), that exactly characterizes those morphisms in $\bf{Top}$ that are covering maps? If not, is this possible in some more restricted or similar category? (such as the category of points topological spaces, the category of locally path-connected semilocally simply-connected spaces, or the homotopy category $\bf{hTop}$)?

*If such a condition does not exist, is there some category-theoretical explanation for why covering spaces have these lifting properties?

 A: This answer may not be entirely satisfactory to your question - in particular it has nothing to do with lifting properties -, but is too long to leave as a comment either way.
First of all, I'm gonna make the claim that the standard definition of a covering space already is something categorical. The caveat is that it is not formalized in the category $\mathbf{Top}$, but rather in the site $(\mathbf{Top},J)$, where the coverage is the canonical coverage given by open covers of topological spaces. Indeed, rephrasing the definition of a covering map is just saying that a morphism $Y\rightarrow X$ in $\mathbf{Top}$ is a covering map if you can find a covering family $\{U_i\rightarrow X\}_{i\in I}$ of $X$ (in the sense of the coverage $J$), such that the canonical projections $U_i\times_XY\rightarrow U_i$ are isomorphic to projections out of a coproduct $U_i\sqcup\dotsc\sqcup U_i\rightarrow U_i$ for each $i\in I$. This definition can be replicated in any other site.
Now, I assume you will object to the above, because I am just sidestepping the issue of whether "open covers" are a categorical notion by including it in the datum of a site. Let me argue that you can, in fact, define this entirely inside the category $\mathbf{Top}$. The only thing we need to do this is the distinguished morphism $\{1\}\rightarrow T$ in $\mathbf{Top}$, the inclusion $\{1\}\subseteq T$, where $T$ is the Sierpinski space: its underlying set is $\{0,1\}$ and the topology is the one for which $\{1\}$ is an open point and $\{0\}$ is not. Then, I claim as an exercise that a map $U\rightarrow X$ is, up to isomorphism (which is all that we can expect categorically, but which works just as well for the above formalism), the inclusion of an open subset of $X$ if and only if it fits into a pullback diagram of the form
$$
\require{AMScd}
\begin{CD}
U @>>> X\\
@VVV @VVV\\
\{1\} @>>> T
\end{CD}.
$$
In a sense, this expresses that the inclusion $\{1\}\rightarrow T$ is universal amongst all inclusions of open subspaces (this rests on the fact that if $\tau$ is the topology on $X$, the map $\tau\rightarrow\mathrm{Hom}(X,T),\,U\mapsto1_U$ is a natural bijection - in particular, the element $\{1\}\in\tau_T$ is a universal element of the contravariant functor $\mathbf{Top}\rightarrow\mathbf{Set}$ taking a space to its topology, whence the morphism $\{1\}\rightarrow T$ is, up to isomorphism, characterized categorically in terms of this functor). Lastly, we only need to characterize when a collection of such maps $\{U_i\rightarrow X\}_{i\in I}$ is a cover of $X$, but this is the case if and only if the induced morphism $\coprod_{i\in I}U_i\rightarrow X$ is surjective, equivalently an epimorphism in $\mathbf{Top}$.
A: As I often say on these questions about $\textbf{Top}$, there is a trick that lets you reconstruct concrete topological spaces from the abstract category, so – in a stupid way – you can always find a purely category theoretic formulation of whatever topological property you like.
The definition of covering space (without path connectivity hypotheses) is such a property, so it can be done, at least in a stupid way.
The right way to ask these questions is to ask for a definition that works in several categories, or at least comes close to working in several categories.
Thorgott's answer, using Grothendieck topologies, is such a definition.
I indicate the generalisation.
Let $\mathcal{C}$ be a category and let $J$ be a Grothendieck topology on $\mathcal{C}$.
A covering fibration is a morphism $p : E \to B$ in $\mathcal{C}$ for which there exist sets $\Phi$ and $\Psi$ with the following properties:

*

*$\Phi$ is a set of pairs $(T, b)$ where $T$ is an object in $\mathcal{C}$ and $b : T \to B$ is a morphism in $\mathcal{C}$.


*$\Psi$ is a set of pairs $(T, e)$ where $T$ is an object in $\mathcal{C}$ and $e : T \to E$ is a morphism in $\mathcal{C}$ such that $(T, p \circ e)$ is an element of $\Phi$.


*The sieve generated by $\Phi$ is a $J$-covering sieve on $B$.


*Given a commutative diagram in $\mathcal{C}$ of the form below,
$$\require{AMScd}
\begin{CD}
S @>{e}>> E \\
@V{t}VV @VV{p}V \\
T @>>{b}> B
\end{CD}$$
if $(T, b) \in \Phi$, then we have a $J$-covering sieve on $S$ consisting of all pairs $(R, s)$ where $R$ is an object in $\mathcal{C}$ and $s : R \to S$ is a morphism in $\mathcal{C}$ such that $e \circ s = e' \circ t'$ for some $(T, e') \in \Psi$ with $p \circ e' = b$ and some $t' : R \to T$ in $\mathcal{C}$.


*Given a commutative diagram in $\mathcal{C}$ of the form below,
$$\begin{CD}
S @>{t_1}>> T \\
@V{t_0}VV @VV{e_1}V \\
T @>>{e_0}> E
\end{CD}$$
where $(T, e_0)$ and $(T, e_1)$ are in $\Psi$, if $p \circ e_0 = p \circ e_1$, then either $e_0 = e_1$, or the empty sieve is a $J$-covering sieve on $S$, or both.
Essentially:

*

*$\Phi$ is a set of "parts" of $B$.


*$\Psi$ is a set of "parts" of $E$ that are mapped by $p$ to an element of $\Phi$.


*$\Phi$ covers $B$.


*For each $(T, b) \in \Phi$, the subset of $\Psi$ consisting of those $(T, e)$ such that $p \circ e = b$ is a cover of the part of $E$ lying over $(T, b)$.


*Given $(T, e_0) \in \Psi$ and $(T, e_1) \in \Psi$, if $p \circ e_0 = p \circ e_1$, then either $e_0 = e_1$, or $(T, e_0)$ and $(T, e_1)$ are disjoint parts of $E$.
When $\mathcal{C}$ has pullbacks we can simplify the last two conditions in the definition:


*Given a pullback square in $\mathcal{C}$ of the form below,
$$\require{AMScd}
\begin{CD}
T \times_B E @>{e}>> E \\
@V{t}VV @VV{p}V \\
T @>>{b}> B
\end{CD}$$
if $(T, b) \in \Phi$, then we have a $J$-covering sieve on $T \times_B E$ generated by the set of all pairs $(T, s)$ where $t \circ s = \textrm{id}_T$ and $(T, e \circ s) \in \Phi$.
(Note that $p \circ e \circ s = b \circ t \circ s = b$.)


*Given a pullback square in $\mathcal{C}$ of the form below,
$$\begin{CD}
T \times_E T @>{t_1}>> T \\
@V{t_0}VV @VV{e_1}V \\
T @>>{e_0}> E
\end{CD}$$
where $(T, e_0)$ and $(T, e_1)$ are in $\Psi$, if $p \circ e_0 = p \circ e_1$, then either $e_0 = e_1$, or the empty sieve is a $J$-covering sieve on $T \times_E T$, or both.
Example.
For $\mathcal{C} = \textbf{Top}$ and $J$ the open cover topology, this recovers the usual notion of covering map, albeit without any connectedness or surjectivity hypotheses.
Example.
Likewise for $\mathcal{C}$ the category of locales and $J$ the open cover topology.
Example.
Likewise for $\mathcal{C}$ the category of manifolds and $J$ the open cover topology.
Note that $\mathcal{C}$ does not have arbitrary pullbacks in this case!
Example.
For $\mathcal{C}$ the category of affine schemes and $J$ either the étale topology or the fppf topology, given a finite separable field extension $k \to K$, we find that $\operatorname{Spec} K \to \operatorname{Spec} k$ is a covering fibration in the sense above.
Note that $\mathcal{C}$ does not have infinite disjoint unions in this case!
