FreeCalypso > hg > themwi-smsc
comparison doc/Arch-design @ 5:8a7eb3d4570a
doc/Arch-design: document the plan of shell access to SMSC
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sat, 23 Dec 2023 04:09:20 +0000 |
parents | da97e78a5586 |
children | acc5b1c3e07d |
comparison
equal
deleted
inserted
replaced
4:da97e78a5586 | 5:8a7eb3d4570a |
---|---|
310 | 310 |
311 The complexity described above is needed for the following reasons: | 311 The complexity described above is needed for the following reasons: |
312 | 312 |
313 * One radical idea is to grant limited access (by way of a very strict wrapper) | 313 * One radical idea is to grant limited access (by way of a very strict wrapper) |
314 to themwi-smsc-dump to unprivileged users of the network served by the SMSC, | 314 to themwi-smsc-dump to unprivileged users of the network served by the SMSC, |
315 i.e., to end users. The idea is that each individual user should be able to | 315 i.e., to end users. Please see section 3.2 for the details. |
316 give their ssh public key to the administrator of the community network, and | |
317 then ssh into a special restricted service on the SMSC that does not grant | |
318 any system shell access, but allows them to access services under their own | |
319 phone number. Such an empowered end user should be able to submit SMS from | |
320 their own phone number using the power of a full-size computer (as opposed to | |
321 very painful text entry on the numeric keypad of a traditional GSM phone), | |
322 and to see a full log of all messages received by or sent from their own | |
323 phone number. | |
324 | 316 |
325 * By the nature of her job, the administrator of the SMSC (and of the community | 317 * By the nature of her job, the administrator of the SMSC (and of the community |
326 GSM network to which this SMSC belongs) necessarily has access to every | 318 GSM network to which this SMSC belongs) necessarily has access to every |
327 message that passes through the system, all metadata and actual content. | 319 message that passes through the system, all metadata and actual content. |
328 While this access is technically necessary, an administrator who is worthy of | 320 While this access is technically necessary, an administrator who is worthy of |
753 themwi-smsc-gsmif remain to be determined; the current plan is to implement | 745 themwi-smsc-gsmif remain to be determined; the current plan is to implement |
754 other parts of ThemWi-SMSC first. | 746 other parts of ThemWi-SMSC first. |
755 | 747 |
756 3. SMS communication via direct shell access | 748 3. SMS communication via direct shell access |
757 | 749 |
750 In the context of Themyscira Wireless, local users of the SMSC are human | |
751 members of our local community who have mobile telephone numbers (MTNs) on | |
752 Themyscira Wireless network. The conventional way to access Short Message | |
753 Service is via a GSM phone handset with a Themyscira SIM card: send outgoing | |
754 messages as MO and receive incoming ones as MT. However, we (the Presiding | |
755 Sisterhood of Themyscira) think outside the box, and we believe in maximal user | |
756 empowerment - hence we aim to provide a second way for any of our users to | |
757 access SMS at their personal MTN, via a novel ssh-based command line mechanism. | |
758 | |
759 The idea is that each individual user should be able to give their ssh public | |
760 key to the administrator of the community network, and then ssh into a special | |
761 restricted service on the SMSC that does not grant any system shell access, but | |
762 allows them to access services under their own phone number. Such an empowered | |
763 end user should be able to submit SMS from their own phone number using the | |
764 power of a full-size computer (as opposed to very painful text entry on the | |
765 numeric keypad of a traditional GSM phone), and to see a full log of all | |
766 messages received by or sent from their own phone number. | |
767 | |
768 Aside from allowing outgoing SMS to be composed on a real computer in vi instead | |
769 of phone keypad text entry, ssh-based access to the SMSC works over the Internet | |
770 and is thus available from everywhere in the world, far outside the coverage | |
771 area of the local GSM network. Enabling Themyscira citizens to send SMS from | |
772 their own "home" number and see texts arriving at that same number while far | |
773 away from home GSM service is expected to be a highly empowering feature. | |
774 | |
775 3.1. themwi-smsc-submit command line utility | |
776 | |
777 This shell utility takes two mandatory command line arguments (source and | |
778 destination phone numbers) and reads SM body text from stdin. The input | |
779 language expected on stdin will be the same as output from sms-encode-text | |
780 utility, described here: | |
781 | |
782 https://www.freecalypso.org/hg/sms-coding-utils/file/tip/doc/Tool-workflow | |
783 | |
784 themwi-smsc-submit will construct a new SM in the form of struct sm_record and | |
785 inject it into the SMSC with SMSC_REQ_SUBMIT. themwi-smsc-core needs to be | |
786 running, but no other component daemons are needed. | |
787 | |
788 This utility is envisioned as having multiple uses: | |
789 | |
790 * During SMSC development, it is the easiest way to generate messages. | |
791 | |
792 * For end user access to the SMSC (the main topic of this chapter), there will | |
793 a wrapper that allows users to enter arbitrary destination number and message | |
794 body input, but the source phone number will be fixed to that of the | |
795 subscriber. | |
796 | |
797 * All "big" MNOs have "special" auto-generated SMS they send out for customer | |
798 notifications and whatnot, with message source address set to some special | |
799 number or even alphanumeric (TON=5), and they can also have special encodings | |
800 performing functions such as SIM OTA programming. themwi-smsc-submit is one | |
801 way to generate such SMs; the other option is to have custom processes for | |
802 other MNO functions connect directly to themwi-smsc-core socket interface, | |
803 but in simpler and more casual environments the command line utility is | |
804 expected to be sufficient. | |
805 | |
806 3.2. Unprivileged user access to themwi-smsc-dump | |
807 | |
808 The principal operation of themwi-smsc-dump is described in section 2.2.3. | |
809 When accessed directly, without going through restrictive wrappers, this tool | |
810 has the power of reading every message that ever went through the local SMSC, | |
811 going back to the beginning of PMS archive - such unrestricted access should be | |
812 given only to trusted administrators. However, themwi-smsc-dump will also have | |
813 a lot of command line options that restrict what it displays, including an | |
814 option to show only messages whose source or destination matches a certain phone | |
815 number. A restrictive wrapper that invokes themwi-smsc-dump with this specific | |
816 number option, and strictly preens all other options, can be made available to | |
817 unprivileged users who wish to use ssh access to read their SMS. | |
818 | |
819 If someone receives SMS at their phone number while away from ThemWi GSM | |
820 coverage, the received SM will remain in the SMSC in the active state - | |
821 themwi-smsc-gsmif will be retrying delivery attempts to the GSM MS. If the | |
822 human owner of that phone number uses ssh access to read their SMS while in | |
823 this state, they will see the received message in the active state; if they get | |
824 back home into coverage zone before the received SM expires, they will also | |
825 receive the same SM on their GSM phone. | |
826 | |
827 4. Interface to local Osmocom GSM network | |
828 | |
829 GSUP and separate MSISDN-to-IMSI lookup, to be described. | |
830 | |
831 5. SMPP connection handlers and outside-world SM exchange | |
832 | |
758 To be filled. | 833 To be filled. |
759 | |
760 4. Interface to local Osmocom GSM network | |
761 | |
762 GSUP and separate MSISDN-to-IMSI lookup, to be described. | |
763 | |
764 5. SMPP connection handlers and outside-world SM exchange | |
765 | |
766 To be filled. |