This file is indexed.

/usr/share/doc/ikiwiki-hosting-common/design/username.html is in ikiwiki-hosting-common 0.20170622ubuntu1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>username</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />

<link rel="stylesheet" href="../style.css" type="text/css" />

<link rel="stylesheet" href="../local.css" type="text/css" />










</head>
<body>

<div class="page">

<div class="pageheader">
<div class="header">
<span>
<span class="parentlinks">

<a href="../index.html">ikiwiki hosting internals</a>/ 

<a href="../design.html">design</a>/ 

</span>
<span class="title">
username

</span>
</span>



</div>









</div>





<div id="pagebody">

<div id="content" role="main">
<p>Site subdomains are mapped to unique unix usernames.</p>

<p>Subdomain limits:</p>

<ul>
<li>253 characters total (including top level domain)</li>
<li>a-zA-Z0-9-</li>
</ul>


<p>Unix username limits:</p>

<ul>
<li>32 characters limit (some things support longer, but not everything)</li>
<li>recommended to match: [a-z<em>][a-z0-9</em>-]*</li>
<li>may be user-visible (ie, for ssh)</li>
</ul>


<h2>format for short subdomains</h2>

<p>This format will be used most of the time, and it makes it easy to see
what hostname a process is running for, etc.</p>

<p>First 2 chars: Avoid conflict with system usernames, and briefly indicate
top-level domain name. "b-"</p>

<p>Remaining 30 chars: subdomain, if it is short enough</p>

<h2>format with hash for longer subdomains</h2>

<p>Any hash has potential for collisions. The chances of such a collision
occuring in relatively short, limited DNS subdomains are quite rare, and in
the unlikely case of one happening, the system should just print an error
and the user can pick a different subdomain. This means that the system has
to explicitly check for a hash collision at site creation time.</p>

<p>I think it follows that we do not have to choose a hash that is
crytographically strong.</p>

<p>md5_base64, with + replaced by _, and / by -</p>

<ul>
<li>22 characters</li>
<li>could spell a rude word, if unlucky</li>
<li>other 10 characters could be "b5-" + &lt;7 characters of subdomain&gt;
to avoid any overlap with other usernames, encode the hash type,
and make the subdomain semi-discoverable</li>
<li>small potential for collisions</li>
</ul>


<p>md5_hex</p>

<ul>
<li>32 characters</li>
<li>no rude words</li>
<li>small potential for overlap with (32 character only!) system usernames</li>
<li>small potential for collisions</li>
</ul>


<p>sha1_base64, with + replaced by _, and / by -</p>

<ul>
<li>27 characters</li>
<li>could spell a rude word, if unlucky</li>
<li>other 5 characters could be "bsh1-" to avoid any overlap
with other usernames, and encode the hash type
(or "b1-" + &lt;2 characters of subdomain&gt;, but 2 chars is not
a worthwhile amount)</li>
<li>small(er?) potential for collisions</li>
</ul>


<p>half of md5_hex</p>

<ul>
<li>16 characters</li>
<li>no rude words</li>
<li>other 16 characters can be "b5-" + &lt;12 characters of subdomain&gt; + "-"
to avoid any overlap with other usernames, encode the hash type,
and make the subdomain semi-discoverable</li>
<li>larger potential for collisions, as we have a 64 bit hash</li>
<li><strong>what is currently used</strong></li>
</ul>


</div>







</div>

<div id="footer" class="pagefooter" role="contentinfo">

<div id="pageinfo">






<div id="backlinks">
Links:

<a href="../design.html">design</a>


</div>






<div class="pagedate">
Last edited <span class="date">Thu Jun 22 09:08:31 2017</span>
<!-- Created <span class="date">Thu Jun 22 09:08:31 2017</span> -->
</div>

</div>


<!-- from ikiwiki hosting internals -->
</div>

</div>

</body>
</html>